[PATCH v2] drm/imx/dcss: Fix clock leak on blkctl init failure

Laurentiu Palcu laurentiu.palcu at oss.nxp.com
Fri Oct 30 06:42:14 PDT 2026


On Fri, Oct 30, 2026 at 07:13:03PM +0800, laixiangwu wrote:
> dcss_submodules_init() enables the DCSS clocks before initializing the
> submodules, but if the first submodule (blkctl) fails to initialize the
> function returns directly, without disabling the clocks again. All the
> later error paths already jump to err_clocks, which calls
> dcss_clocks_disable().
> 
> Since the clocks are only devm-managed for their reference (devm_clk_get),
> a blkctl init failure leaves all five DCSS clocks prepared and enabled.
> 
> Jump to err_clocks so the clocks are disabled like on the other error
> paths.
> 
> Also rename the error labels of dcss_submodules_init() to the more
> common err_<x> style, which describes what is cleaned up from each
> label on, and update the gotos accordingly.
> 
> Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ")
> Suggested-by: Laurentiu Palcu <laurentiu.palcu at oss.nxp.com>

Thanks, but the fix is yours. I merely suggested some cosmetic changes. :)

> Signed-off-by: laixiangwu <laixiangwu at cmss.chinamobile.com>

Reviewed-by: Laurentiu Palcu <laurentiu.palcu at oss.nxp.com>

-- 
Thanks,
Laurentiu



More information about the linux-arm-kernel mailing list