diff options
| author | 2025-10-29 15:17:58 +0800 | |
|---|---|---|
| committer | 2025-11-06 13:12:33 +0000 | |
| commit | 1a58d865f423f4339edf59053e496089075fa950 (patch) | |
| tree | 5900b797723b0d2b8ac1c52fce651d3e8395dfb8 /tools/arch/powerpc/include/uapi/ssh:/git@git.zx2c4.com/git: | |
| parent | ASoC: cs4271: Fix regulator leak on probe failure (diff) | |
ASoC: sdw_utils: fix device reference leak in is_sdca_endpoint_present()
The bus_find_device_by_name() function returns a device pointer with an
incremented reference count, but the original code was missing put_device()
calls in some return paths, leading to reference count leaks.
Fix this by ensuring put_device() is called before function exit after
bus_find_device_by_name() succeeds
This follows the same pattern used elsewhere in the kernel where
bus_find_device_by_name() is properly paired with put_device().
Found via static analysis and code review.
Fixes: 4f8ef33dd44a ("ASoC: soc_sdw_utils: skip the endpoint that doesn't present")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://patch.msgid.link/20251029071804.8425-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/arch/powerpc/include/uapi/ssh:/git@git.zx2c4.com/git:')
0 files changed, 0 insertions, 0 deletions
