kernel_samsung_a53x/sound/soc
Amelie Delaunay c6abcded78 ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove
[ Upstream commit 9bb4af400c386374ab1047df44c508512c08c31f ]

In case of error when requesting ctrl_chan DMA channel, ctrl_chan is not
null. So the release of the dma channel leads to the following issue:
[    4.879000] st,stm32-spdifrx 500d0000.audio-controller:
dma_request_slave_channel error -19
[    4.888975] Unable to handle kernel NULL pointer dereference
at virtual address 000000000000003d
[...]
[    5.096577] Call trace:
[    5.099099]  dma_release_channel+0x24/0x100
[    5.103235]  stm32_spdifrx_remove+0x24/0x60 [snd_soc_stm32_spdifrx]
[    5.109494]  stm32_spdifrx_probe+0x320/0x4c4 [snd_soc_stm32_spdifrx]

To avoid this issue, release channel only if the pointer is valid.

Fixes: 794df9448edb ("ASoC: stm32: spdifrx: manage rebind issue")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://patch.msgid.link/20241105140242.527279-1-olivier.moysan@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:23 +01:00
..
adi
amd
atmel
au1x Revert "ASoC: allow module autoloading for table db1200_pids" 2024-11-24 00:23:34 +01:00
bcm
cirrus
codecs Revert "ASoC: rt5682: Return devm_of_clk_add_hw_provider to transfer the error" 2024-11-24 00:23:17 +01:00
dwc
fsl ASoC: fsl_sai: Enable 'FIFO continue on error' FCONT bit 2024-11-23 23:22:00 +01:00
generic ASoC: Fix 7/8 spaces indentation in Kconfig 2024-11-19 11:32:42 +01:00
hisilicon
img
intel ASoC: intel: fix module autoloading 2024-11-23 23:21:15 +01:00
jz4740
kirkwood
mediatek
meson Revert "ASoC: meson: axg-card: fix 'use-after-free'" 2024-11-24 00:23:34 +01:00
mxs
pxa ARM: pxa: spitz: use gpio descriptors for audio 2024-11-23 23:20:06 +01:00
qcom ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe() 2024-11-23 23:22:02 +01:00
rockchip
samsung
sh
sirf
sof
spear
sprd
sti
stm ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove 2024-11-30 02:33:23 +01:00
sunxi
tegra ASoC: tegra: Fix DSPK 16-bit playback 2024-11-19 11:32:48 +01:00
ti ASoC: ti: omap-hdmi: Fix too long driver name 2024-11-19 14:19:48 +01:00
txx9
uniphier
ux500
xilinx
xtensa
zte
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-card.c
soc-component.c
soc-compress.c
soc-core.c
soc-dai.c
soc-dapm.c ASoC: dapm: Fix UAF for snd_soc_pcm_runtime object 2024-11-23 23:20:59 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ALSA: dmaengine: Synchronize dma channel after drop() 2024-11-19 14:19:48 +01:00
soc-jack.c
soc-link.c
soc-ops.c ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw 2024-11-19 09:23:10 +01:00
soc-pcm.c
soc-topology.c Revert "ASoC: topology: Properly initialize soc_enum values" 2024-11-24 00:23:41 +01:00
soc-utils.c