clk: fix an OF node reference leak in of_clk_get_parent_name()
[ Upstream commit 28fa3291 ] Current implementation of of_clk_get_parent_name() leaks an OF node reference on error path. Add a of_node_put() call before returning an error. This bug was found by an experimental static analysis tool that I am developing. Fixes: 8da411cc ("clk: let of_clk_get_parent_name() fail for invalid clock-indices") Signed-off-by:Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Link: https://lore.kernel.org/r/20241210130913.3615205-1-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by:
Stephen Boyd <sboyd@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading
-
mentioned in commit 1badbd72
-
mentioned in commit msm-4.19@e2479b65
-
mentioned in commit msm-4.4@e2479b65
-
mentioned in commit common@e2479b65
-
mentioned in commit msm-3.18@e2479b65
-
mentioned in commit e2479b65
-
mentioned in commit msm-4.14@e2479b65
Please register or sign in to comment