diff options
| author | Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> | 2024-12-10 22:09:12 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-08 09:57:03 +0100 |
| commit | e561d1a2ba3a32e54432d323352e87fc55eb6829 (patch) | |
| tree | eed3e7ea7e8cd969e2c96e16ff49b4c31d4ef0a2 /Documentation | |
| parent | 712b9797e45a08059e30793072f9ba7e7d37024c (diff) | |
| download | linux-e561d1a2ba3a32e54432d323352e87fc55eb6829.tar.gz linux-e561d1a2ba3a32e54432d323352e87fc55eb6829.tar.bz2 linux-e561d1a2ba3a32e54432d323352e87fc55eb6829.zip | |
clk: fix an OF node reference leak in of_clk_get_parent_name()
[ Upstream commit 28fa3291cad1c201967ef93edc6e7f8ccc9afbc0 ]
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: 8da411cc1964 ("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>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions
