linux-stable/sound/soc/qcom
Colin Ian King 99adc8b4d2 ASoC: qcom: Fix uninitialized pointer dmactl
[ Upstream commit 1382d8b551 ]

In the case where __lpass_get_dmactl_handle is called and the driver
id dai_id is invalid the pointer dmactl is not being assigned a value,
and dmactl contains a garbage value since it has not been initialized
and so the null check may not work. Fix this to initialize dmactl to
NULL. One could argue that modern compilers will set this to zero, but
it is useful to keep this initialized as per the same way in functions
__lpass_platform_codec_intf_init and lpass_cdc_dma_daiops_hw_params.

Cleans up clang scan build warning:
sound/soc/qcom/lpass-cdc-dma.c:275:7: warning: Branch condition
evaluates to a garbage value [core.uninitialized.Branch]

Fixes: b81af585ea ("ASoC: qcom: Add lpass CPU driver for codec dma control")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://msgid.link/r/20240221134804.3475989-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-06 14:48:37 +00:00
..
qdsp6 ASoC: qcom: convert not to use asoc_xxx() 2024-03-06 14:48:37 +00:00
apq8016_sbc.c ASoC: qcom: convert not to use asoc_xxx() 2024-03-06 14:48:37 +00:00
apq8096.c ASoC: qcom: convert not to use asoc_xxx() 2024-03-06 14:48:37 +00:00
common.c ASoC: qcom: convert not to use asoc_xxx() 2024-03-06 14:48:37 +00:00
common.h ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE 2023-01-09 13:04:14 +00:00
Kconfig ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE 2023-01-09 13:04:14 +00:00
lpass-apq8016.c ASoC: qcom: merge DAI call back functions into ops 2023-08-14 13:10:14 +01:00
lpass-cdc-dma.c ASoC: qcom: Fix uninitialized pointer dmactl 2024-03-06 14:48:37 +00:00
lpass-cpu.c ASoC: qcom: merge DAI call back functions into ops 2023-08-14 13:10:14 +01:00
lpass-hdmi.c ASoC: qcom: lpass-hdmi: remove useless return 2021-03-10 13:01:49 +00:00
lpass-hdmi.h ASoC: qcom: Add support for lpass hdmi driver 2020-10-08 20:27:34 +01:00
lpass-ipq806x.c ASoC: qcom: merge DAI call back functions into ops 2023-08-14 13:10:14 +01:00
lpass-lpaif-reg.h ASoC: qcom: Add register definition for codec rddma and wrdma 2022-02-24 20:21:42 +00:00
lpass-platform.c ASoC: qcom: convert not to use asoc_xxx() 2024-03-06 14:48:37 +00:00
lpass-sc7180.c ASoC: qcom: merge DAI call back functions into ops 2023-08-14 13:10:14 +01:00
lpass-sc7280.c ASoC: qcom: merge DAI call back functions into ops 2023-08-14 13:10:14 +01:00
lpass.h ASoC: qcom: merge DAI call back functions into ops 2023-08-14 13:10:14 +01:00
Makefile ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE 2023-01-09 13:04:14 +00:00
sc7180.c ASoC: qcom: convert not to use asoc_xxx() 2024-03-06 14:48:37 +00:00
sc7280.c ASoC: qcom: convert not to use asoc_xxx() 2024-03-06 14:48:37 +00:00
sc8280xp.c ASoC: qcom: convert not to use asoc_xxx() 2024-03-06 14:48:37 +00:00
sdm845.c ASoC: qcom: convert not to use asoc_xxx() 2024-03-06 14:48:37 +00:00
sdw.c ASoC: qcom: convert not to use asoc_xxx() 2024-03-06 14:48:37 +00:00
sdw.h ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE 2023-01-09 13:04:14 +00:00
sm8250.c ASoC: qcom: convert not to use asoc_xxx() 2024-03-06 14:48:37 +00:00
storm.c ASoC: qcom: convert not to use asoc_xxx() 2024-03-06 14:48:37 +00:00