]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: qcom: sdw: fix memory leak
authorMark Brown <broonie@kernel.org>
Thu, 30 Oct 2025 16:07:10 +0000 (16:07 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 30 Oct 2025 16:07:10 +0000 (16:07 +0000)
Merge series from Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>:

For some reason we endedup allocating sdw_stream_runtime for every cpu dai,
this has two issues.
    1. we never set snd_soc_dai_set_stream for non soundwire dai, which
       means there is no way that we can free this, resulting in memory leak
    2. startup and shutdown callbacks can be called without
       hw_params callback called. This combination results in memory leak
    because machine driver sruntime array pointer is only set in hw_params
    callback.

All the machine drivers have these memory leaks, so cleanup the mess and
make them use common helpers from sdw.c

This patch series fix the issue, and while we are at it, it also remove
some redundant code from machine drivers.

1  2 
sound/soc/fsl/fsl_micfil.c
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
sound/soc/qcom/sc8280xp.c
sound/soc/qcom/sm8250.c
sound/soc/sdw_utils/soc_sdw_utils.c

Simple merge
Simple merge
Simple merge
Simple merge