Re: [PATCH] soc: imx8m: Fix error handling for clk_prepare_enable()
From: Daniel Baluta
Date: Wed Jan 14 2026 - 03:05:00 EST
On Wed, Jan 14, 2026 at 12:13 AM Peng Fan (OSS) <peng.fan@xxxxxxxxxxx> wrote:
>
> From: Peng Fan <peng.fan@xxxxxxx>
>
> imx8m_soc_prepare() directly returns the result of clk_prepare_enable(),
> which skips proper cleanup if the clock enable fails. Check the return
> value of clk_prepare_enable() and release resources if failure.
>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <error27@xxxxxxxxx>
> Closes: https://lore.kernel.org/r/202601111406.ZVV3YaiU-lkp@xxxxxxxxx/
> Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
Reviewed-by: Daniel Baluta <daniel.baluta@xxxxxxx>