Commit 1b3d2e7a authored by Sean Wang's avatar Sean Wang Committed by Greg Kroah-Hartman

soc: mediatek: fix the mistaken pointer accessed when subdomains are added

commit 73ce2ce1 upstream.

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: 53fddb1a ("soc: mediatek: reduce code duplication of scpsys_probe across all SoCs")
Reported-by: default avatarWeiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3f306336
......@@ -892,7 +892,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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment