summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-s2mps11.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2020-12-12 13:28:18 +0100
committerStephen Boyd <sboyd@kernel.org>2020-12-20 00:53:31 +0100
commitd2d94fc567624f96187e8b52083795620f93e69f (patch)
treef0bccbff9cecc82a144e2c96bada7f04fdc117f0 /drivers/clk/clk-s2mps11.c
parentclk: bcm: dvp: Add MODULE_DEVICE_TABLE() (diff)
downloadlinux-d2d94fc567624f96187e8b52083795620f93e69f.tar.xz
linux-d2d94fc567624f96187e8b52083795620f93e69f.zip
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>
Diffstat (limited to 'drivers/clk/clk-s2mps11.c')
-rw-r--r--drivers/clk/clk-s2mps11.c1
1 files changed, 1 insertions, 0 deletions
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);