summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-10-31 15:11:23 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-11-14 23:35:40 +0300
commite42eec0f182ac0605e658145f6fe3b6a7c256c45 (patch)
tree507d2aadebc704d14bf5c0503c8be4542e720385 /tools/perf/scripts/python/exported-sql-viewer.py
parentfaa5fd605d2081b6c9fa2355b59582d4ccd24b16 (diff)
downloadlinux-e42eec0f182ac0605e658145f6fe3b6a7c256c45.tar.xz
Bluetooth: btbcm: fix missing of_node_put() in btbcm_get_board_name()
of_find_node_by_path() returns a pointer to a device_node with its refcount incremented, and a call to of_node_put() is required to decrement the refcount again and avoid leaking the resource. If 'of_property_read_string_index(root, "compatible", 0, &tmp)' fails, the function returns without calling of_node_put(root) before doing so. The automatic cleanup attribute can be used by means of the __free() macro to automatically call of_node_put() when the variable goes out of scope, fixing the issue and also accounting for new error paths. Fixes: 63fac3343b99 ("Bluetooth: btbcm: Support per-board firmware variants") Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions