Skip to content

Commit fa231be

Browse files
pinchartlShawn Guo
authored andcommitted
soc: imx: gpcv2: Fix clock disabling imbalance in error path
The imx_pgc_power_down() starts by enabling the domain clocks, and thus disables them in the error path. Commit 18c9857 ("soc: imx: gpcv2: add domain option to keep domain clocks enabled") made the clock enable conditional, but forgot to add the same condition to the error path. This can result in a clock enable/disable imbalance. Fix it. Fixes: 18c9857 ("soc: imx: gpcv2: add domain option to keep domain clocks enabled") Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
1 parent 45d941f commit fa231be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/soc/imx/gpcv2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ static int imx_pgc_power_down(struct generic_pm_domain *genpd)
382382
return 0;
383383

384384
out_clk_disable:
385-
clk_bulk_disable_unprepare(domain->num_clks, domain->clks);
385+
if (!domain->keep_clocks)
386+
clk_bulk_disable_unprepare(domain->num_clks, domain->clks);
386387

387388
return ret;
388389
}

0 commit comments

Comments
 (0)