]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: qcom: sdm845: Add error handling in sdm845_slim_snd_hw_params()
authorWentao Liang <vulab@iscas.ac.cn>
Mon, 19 May 2025 07:57:39 +0000 (15:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:11:13 +0000 (11:11 +0100)
commit98640457c02c56a9bd7a7b04cb868611b488f876
treea75cf0aadc2f9b51d4253686a6b6ecbfcf86ee2c
parentd765505bca3cf20e5edd46c06d38912515b01712
ASoC: qcom: sdm845: Add error handling in sdm845_slim_snd_hw_params()

commit 688abe2860fd9c644705b9e11cb9649eb891b879 upstream.

The function sdm845_slim_snd_hw_params() calls the functuion
snd_soc_dai_set_channel_map() but does not check its return
value. A proper implementation can be found in msm_snd_hw_params().

Add error handling for snd_soc_dai_set_channel_map(). If the
function fails and it is not a unsupported error, return the
error code immediately.

Fixes: 5caf64c633a3 ("ASoC: qcom: sdm845: add support to DB845c and Lenovo Yoga")
Cc: stable@vger.kernel.org # v5.6
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250519075739.1458-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/qcom/sdm845.c