diff options
| author | Miaoqian Lin <linmq006@gmail.com> | 2025-09-03 21:37:29 +0800 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2025-11-03 15:58:41 +0100 |
| commit | 445e1658894fd74eab7e53071fa16233887574ed (patch) | |
| tree | 2754e5119be2013f4f26a33c8b7ce50333e8daa3 /tools/perf/scripts/python/flamegraph.py | |
| parent | 68ea577631d3e538a8e88bb83091c087170b9c86 (diff) | |
| download | linux-445e1658894fd74eab7e53071fa16233887574ed.tar.gz linux-445e1658894fd74eab7e53071fa16233887574ed.zip | |
media: renesas: rcar_drif: fix device node reference leak in rcar_drif_bond_enabled
The function calls of_parse_phandle() which returns
a device node with an incremented reference count. When the bonded device
is not available, the function
returns NULL without releasing the reference, causing a reference leak.
Add of_node_put(np) to release the device node reference.
The of_node_put function handles NULL pointers.
Found through static analysis by reviewing the doc of of_parse_phandle()
and cross-checking its usage patterns across the codebase.
Fixes: 7625ee981af1 ("[media] media: platform: rcar_drif: Add DRIF support")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
