summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-08-07 16:37:03 +0300
committerLee Jones <lee@kernel.org>2024-08-16 19:01:19 +0300
commit82c5ada1f9d05902a4ccb926c7ce34e2fe699283 (patch)
treeb28aab07c829fd014b2663d21fc17097a5078dce /tools/perf/scripts/python/task-analyzer.py
parent616dbed65485c6e68325d00b6258a05369c14705 (diff)
downloadlinux-82c5ada1f9d05902a4ccb926c7ce34e2fe699283.tar.xz
leds: pca995x: Fix device child node usage in pca995x_probe()
The current implementation accesses the `child` fwnode handle outside of device_for_each_child_node() without incrementing its refcount. Add the missing call to `fwnode_handle_get(child)`. The cleanup process where `child` is accessed is not right either because a single call to `fwnode_handle_put()` is carried out in case of an error, ignoring unasigned nodes at the point when the error happens. Keep `child` inside of the first loop, and use the helper pointer that receives references via `fwnode_handle_get()` to handle the child nodes within the second loop. Keeping `child` inside the first node has also the advantage that the scoped version of the loop can be used. Fixes: ee4e80b2962e ("leds: pca995x: Add support for PCA995X chips") Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20240807-leds-pca995x-fix-fwnode-usage-v1-1-8057c84dc583@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions