Skip to content
Snippets Groups Projects
Commit 42f64d30 authored by Joe Hattori's avatar Joe Hattori Committed by Frieder Schrempf
Browse files

leds: netxbig: Fix an OF node reference leak in netxbig_leds_get_of_pdata()


[ Upstream commit 0508316be63bb735f59bdc8fe4527cadb62210ca ]

netxbig_leds_get_of_pdata() does not release the OF node obtained by
of_parse_phandle() when of_find_device_by_node() fails. Add an
of_node_put() call to fix the leak.

This bug was found by an experimental static analysis tool that I am
developing.

Fixes: 9af512e8 ("leds: netxbig: Convert to use GPIO descriptors")
Signed-off-by: default avatarJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20241216074923.628509-1-joe@pf.is.s.u-tokyo.ac.jp


Signed-off-by: default avatarLee Jones <lee@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b7ff688c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment