]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: codecs: Fix error handling in pm4125 audio codec driver
authorMa Ke <make24@iscas.ac.cn>
Sun, 16 Nov 2025 03:37:16 +0000 (11:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:16:54 +0000 (10:16 +0100)
commit150352153ac9aa3fc995b94946dc7d897f0be354
treee969a73975e8a93554977ef18e9dc013511688a5
parentfb7d608aa7c4f5dbbdccf6bf035f714c0197f4b6
ASoC: codecs: Fix error handling in pm4125 audio codec driver

commit 2196e8172bee2002e9baaa0d02b2f9f2dd213949 upstream.

pm4125_bind() acquires references through pm4125_sdw_device_get() but
fails to release them in error paths and during normal unbind
operations. This could result in reference count leaks, preventing
proper cleanup and potentially causing resource exhaustion over
multiple bind/unbind cycles.

Calling path: pm4125_sdw_device_get() -> bus_find_device_by_of_node()
-> bus_find_device() -> get_device.

Found by code review.

Cc: stable@vger.kernel.org
Fixes: 8ad529484937 ("ASoC: codecs: add new pm4125 audio codec driver")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20251116033716.29369-1-make24@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/pm4125.c