linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: s2mps11: Fix a resource leak in error handling paths in the probe function
@ 2020-12-12 12:28 Christophe JAILLET
  2020-12-15  9:27 ` Krzysztof Kozlowski
  2020-12-19 23:53 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2020-12-12 12:28 UTC (permalink / raw)
  To: krzk, b.zolnierkie, mturquette, sboyd, yadi.brar, mturquette
  Cc: linux-samsung-soc, linux-clk, linux-kernel, kernel-janitors,
	Christophe JAILLET

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>
---
 drivers/clk/clk-s2mps11.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
index aa21371f9104..a3e883a9f406 100644
--- a/drivers/clk/clk-s2mps11.c
+++ b/drivers/clk/clk-s2mps11.c
@@ -195,6 +195,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
 	return ret;
 
 err_reg:
+	of_node_put(s2mps11_clks[0].clk_np);
 	while (--i >= 0)
 		clkdev_drop(s2mps11_clks[i].lookup);
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: s2mps11: Fix a resource leak in error handling paths in the probe function
  2020-12-12 12:28 [PATCH] clk: s2mps11: Fix a resource leak in error handling paths in the probe function Christophe JAILLET
@ 2020-12-15  9:27 ` Krzysztof Kozlowski
  2020-12-19 23:53 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2020-12-15  9:27 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: b.zolnierkie, mturquette, sboyd, yadi.brar, mturquette,
	linux-samsung-soc, linux-clk, linux-kernel, kernel-janitors

On Sat, Dec 12, 2020 at 01:28:18PM +0100, Christophe JAILLET wrote:
> 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>
> ---
>  drivers/clk/clk-s2mps11.c | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: s2mps11: Fix a resource leak in error handling paths in the probe function
  2020-12-12 12:28 [PATCH] clk: s2mps11: Fix a resource leak in error handling paths in the probe function Christophe JAILLET
  2020-12-15  9:27 ` Krzysztof Kozlowski
@ 2020-12-19 23:53 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2020-12-19 23:53 UTC (permalink / raw)
  To: Christophe JAILLET, b.zolnierkie, krzk, mturquette, mturquette,
	yadi.brar
  Cc: linux-samsung-soc, linux-clk, linux-kernel, kernel-janitors,
	Christophe JAILLET

Quoting Christophe JAILLET (2020-12-12 04:28:18)
> 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>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-19 23:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-12 12:28 [PATCH] clk: s2mps11: Fix a resource leak in error handling paths in the probe function Christophe JAILLET
2020-12-15  9:27 ` Krzysztof Kozlowski
2020-12-19 23:53 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).