Skip to content

Commit f7c7c5a

Browse files
MrVanstorulf
authored andcommitted
pmdomain: imx93-blk-ctrl: correct remove path
The check condition should be 'i < bc->onecell_data.num_domains', not 'bc->onecell_data.num_domains' which will make the look never finish and cause kernel panic. Also disable runtime to address "imx93-blk-ctrl 4ac10000.system-controller: Unbalanced pm_runtime_enable!" Fixes: e9aa77d ("soc: imx: add i.MX93 media blk ctrl driver") Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Stefan Wahren <[email protected]> Cc: [email protected] Message-ID: <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent 0bf0203 commit f7c7c5a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ static void imx93_blk_ctrl_remove(struct platform_device *pdev)
313313

314314
of_genpd_del_provider(pdev->dev.of_node);
315315

316-
for (i = 0; bc->onecell_data.num_domains; i++) {
316+
pm_runtime_disable(&pdev->dev);
317+
318+
for (i = 0; i < bc->onecell_data.num_domains; i++) {
317319
struct imx93_blk_ctrl_domain *domain = &bc->domains[i];
318320

319321
pm_genpd_remove(&domain->genpd);

0 commit comments

Comments
 (0)