soc: mediatek: fix the mistaken pointer accessed when subdomains are added
commit 73ce2ce129783813e1ebc37d2c757fe5e0fab1ef 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: 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3f306336cd
commit
1b3d2e7a34
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user