Skip to content

Commit 6bd8b4a

Browse files
Xu YangUlf Hansson
authored andcommitted
pmdomain: imx8m-blk-ctrl: fix out-of-range access of bc->domains
Fix out-of-range access of bc->domains in imx8m_blk_ctrl_remove(). Fixes: 2684ac0 ("soc: imx: add i.MX8M blk-ctrl driver") Cc: [email protected] Signed-off-by: Xu Yang <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent ae0a24c commit 6bd8b4a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pmdomain/imx/imx8m-blk-ctrl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ static void imx8m_blk_ctrl_remove(struct platform_device *pdev)
340340

341341
of_genpd_del_provider(pdev->dev.of_node);
342342

343-
for (i = 0; bc->onecell_data.num_domains; i++) {
343+
for (i = 0; i < bc->onecell_data.num_domains; i++) {
344344
struct imx8m_blk_ctrl_domain *domain = &bc->domains[i];
345345

346346
pm_genpd_remove(&domain->genpd);

0 commit comments

Comments
 (0)