[PATCH] clk: mediatek: mt6735-apmixedsys: Fix an error handling path in clk_mt6735_apmixed_probe()

Stephen Boyd sboyd at kernel.org
Thu Nov 14 12:51:51 PST 2024


Quoting Christophe JAILLET (2024-10-25 08:46:08)
> If an error occurs after a successful mtk_alloc_clk_data(),
> mtk_free_clk_data() should be called, as already done in the .remove()
> function.
> 
> Switch to mtk_devm_alloc_clk_data() in order to fix the memory leak in the
> probe function, and simplify the remove function.
> 
> Fixes: 43c04ed79189 ("clk: mediatek: Add drivers for MediaTek MT6735 main clock and reset drivers")
> Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
> ---

Applied to clk-next



More information about the Linux-mediatek mailing list