]> 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)
committerMark Brown <broonie@kernel.org>
Mon, 17 Nov 2025 00:45:06 +0000 (00:45 +0000)
commit2196e8172bee2002e9baaa0d02b2f9f2dd213949
tree644ddbea70555f0821c53cd479f09fd336de7b4d
parent578ccfe344c5f421c2c6343b872995b397ffd3ff
ASoC: codecs: Fix error handling in pm4125 audio codec driver

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>
sound/soc/codecs/pm4125.c