Commit 28fa3291 authored by Joe Hattori's avatar Joe Hattori Committed by Stephen Boyd
Browse files

clk: fix an OF node reference leak in of_clk_get_parent_name()



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: default avatarJoe 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: default avatarStephen Boyd <sboyd@kernel.org>
parent e5ca5d7b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment