diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2020-12-12 15:28:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-29 15:47:03 +0300 |
commit | ac23ec1bc610e60d9de133cee5a8ac10a0b9834e (patch) | |
tree | cc44ddc693bb3ae5e46a77da884131be0769acfb /drivers/clk | |
parent | c8cc32fde3fa193ae44f0170a6ba1ab27adc7774 (diff) | |
download | linux-ac23ec1bc610e60d9de133cee5a8ac10a0b9834e.tar.xz |
clk: s2mps11: Fix a resource leak in error handling paths in the probe function
[ Upstream commit d2d94fc567624f96187e8b52083795620f93e69f ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk-s2mps11.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index f5d74e8db432..1803af6230b2 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -211,6 +211,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); |