diff options
author | Sean Wang <sean.wang@mediatek.com> | 2018-02-08 19:07:59 +0100 |
---|---|---|
committer | Matthias Brugger <matthias.bgg@gmail.com> | 2018-03-11 23:46:50 +0100 |
commit | 73ce2ce129783813e1ebc37d2c757fe5e0fab1ef (patch) | |
tree | a5b9793cb79ce36780c92d0ecb217e0e694bed67 /drivers/soc | |
parent | soc: mediatek: add SCPSYS power domain driver for MediaTek MT7623A SoC (diff) | |
download | linux-73ce2ce129783813e1ebc37d2c757fe5e0fab1ef.tar.xz linux-73ce2ce129783813e1ebc37d2c757fe5e0fab1ef.zip |
soc: mediatek: fix the mistaken pointer accessed when subdomains are added
Fix the pointer to struct scp_subdomian not being moved forward
when each sub-domain is expected to be iteratively added through
pm_genpd_add_subdomain call.
Cc: stable@vger.kernel.org
Fixes: 53fddb1a66dd ("soc: mediatek: reduce code duplication of scpsys_probe across all SoCs")
Reported-by: Weiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/mediatek/mtk-scpsys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c index fc55faa17867..9de801e9e0e0 100644 --- a/drivers/soc/mediatek/mtk-scpsys.c +++ b/drivers/soc/mediatek/mtk-scpsys.c @@ -1048,7 +1048,7 @@ static int scpsys_probe(struct platform_device *pdev) pd_data = &scp->pd_data; - for (i = 0, sd = soc->subdomains ; i < soc->num_subdomains ; i++) { + for (i = 0, sd = soc->subdomains; i < soc->num_subdomains; i++, sd++) { ret = pm_genpd_add_subdomain(pd_data->domains[sd->origin], pd_data->domains[sd->subdomain]); if (ret && IS_ENABLED(CONFIG_PM)) |