Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: s2mps11: Fix a resource leak in error handling paths in the probe function

Some resource should be released in the error handling path of the probe
function, as already done in the remove function.

The remove function was fixed in commit bf416bd45738 ("clk: s2mps11: Add
missing of_node_put and of_clk_del_provider")

Fixes: 7cc560dea415 ("clk: s2mps11: Add support for s2mps11")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20201212122818.86195-1-christophe.jaillet@wanadoo.fr
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Christophe JAILLET and committed by
Stephen Boyd
d2d94fc5 be439cc4

+1
+1
drivers/clk/clk-s2mps11.c
··· 195 195 return ret; 196 196 197 197 err_reg: 198 + of_node_put(s2mps11_clks[0].clk_np); 198 199 while (--i >= 0) 199 200 clkdev_drop(s2mps11_clks[i].lookup); 200 201