summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2018-02-09 02:07:59 +0800
committerMatthias Brugger <matthias.bgg@gmail.com>2018-03-11 23:46:50 +0100
commit73ce2ce129783813e1ebc37d2c757fe5e0fab1ef (patch)
treea5b9793cb79ce36780c92d0ecb217e0e694bed67 /drivers/soc
parentc932ba8c38ba59d430a6e1d9600c0b8c4a029cce (diff)
downloadlinux-73ce2ce129783813e1ebc37d2c757fe5e0fab1ef.tar.bz2
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.c2
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))