linux/sound/soc
Amelie Delaunay 9bb4af400c
ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove
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: 794df9448e ("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>
2024-11-05 16:26:03 +00:00
..
adi ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
amd ASoC: amd: yc: Fix non-functional mic on ASUS E1404FA 2024-10-17 12:11:31 +01:00
apple ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
atmel ASoC: atmel: mchp-pdmc: Skip ALSA restoration if substream runtime is uninitialized 2024-09-24 13:34:28 +02:00
au1x ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
bcm ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
cirrus soc: convert ep93xx to devicetree 2024-09-26 12:00:25 -07:00
codecs ASoC: tas2781: Add new driver version for tas2563 & tas2781 qfn chip 2024-11-04 14:07:04 +00:00
dwc ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
fsl ASoC: fsl_micfil: Add sample rate constraint 2024-10-22 17:36:30 +01:00
generic ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
google ASoC: google: fix module autoloading 2024-08-26 15:52:07 +01:00
hisilicon
img ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
intel ASoC: Intel: sst: Fix used of uninitialized ctx to log an error 2024-10-28 16:44:52 +00:00
jz4740 ASoC: jz4740: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:21 +09:00
kirkwood ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
loongson ASoC: loongson: Fix component check failed on FDT systems 2024-10-10 12:14:59 +01:00
mediatek ASoC: Updates for v6.12 2024-09-14 09:09:59 +02:00
meson Merge branch 'for-linus' into for-next 2024-09-14 10:16:12 +02:00
mxs ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
pxa ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
qcom ASoC: qcom: sc7280: Fix missing Soundwire runtime stream alloc 2024-10-22 21:00:38 +01:00
rockchip ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
samsung ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
sdw_utils ASoC: sdw_utils/intel: move soundwire endpoint parsing helper functions 2024-09-13 15:11:32 +01:00
sh ASoC: rsnd: Fix probe failure on HiHope boards due to endpoint parsing 2024-10-11 12:06:49 +01:00
sof ASoC: SOF: Intel: hda: Always clean up link DMA during stop 2024-10-17 12:11:20 +01:00
spear ASoC: spear: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:31 +09:00
sprd ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
starfive ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
sti ASoC: sti: add missing probe entry for player and reader 2024-07-29 13:36:56 +01:00
stm ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove 2024-11-05 16:26:03 +00:00
sunxi ASoC: Updates for v6.12 2024-09-14 09:09:59 +02:00
tegra ASoC: Updates for v6.12 2024-09-14 09:09:59 +02:00
ti ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
uniphier ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
ux500 ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
xilinx ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
xtensa ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
Kconfig ASoC: intel/sdw-utils: move soundwire machine driver soc ops 2024-08-01 12:43:57 +01:00
Makefile ASoC: intel/sdw-utils: move soundwire machine driver soc ops 2024-08-01 12:43:57 +01:00
soc-ac97.c ASoC: soc-ac97: Fix the incorrect description 2024-09-10 12:40:24 +01:00
soc-acpi.c
soc-card-test.c ASoC: Drop snd_soc_*_get_kcontrol_locked() 2024-08-09 14:24:55 +02:00
soc-card.c ASoC: Drop snd_soc_*_get_kcontrol_locked() 2024-08-09 14:24:55 +02:00
soc-component.c ASoC: Drop snd_soc_*_get_kcontrol_locked() 2024-08-09 14:24:55 +02:00
soc-compress.c
soc-core.c ASoC: Use of_property_read_bool() 2024-08-01 12:51:45 +01:00
soc-dai.c ASoC: remove snd_soc_dai_link_set_capabilities() 2024-08-22 13:36:46 +01:00
soc-dapm.c ASoC: dapm: fix bounds checker error in dapm_widget_list_create 2024-10-28 23:30:33 +00:00
soc-devres.c
soc-generic-dmaengine-pcm.c ALSA: dmaengine: Synchronize dma channel after drop() 2024-06-11 17:13:31 +01:00
soc-jack.c ASoC: soc-jack: Get rid of legacy GPIO support 2024-03-26 17:13:45 +00:00
soc-link.c
soc-ops.c ASoC: ops: Simplify with cleanup.h 2024-07-08 12:50:02 +01:00
soc-pcm.c ASoC: soc-pcm: makes snd_soc_dpcm_can_be_xxx() local function 2024-08-28 13:02:20 +01:00
soc-topology-test.c ASoC: topology-test: Convert comma to semicolon 2024-09-05 16:07:06 +01:00
soc-topology.c ASoC: topology: Fix incorrect addressing assignments 2024-09-19 13:01:26 +02:00
soc-utils-test.c
soc-utils.c ASoC: soc-utils: allow sample rate up to 768kHz for the dummy dai 2024-06-28 13:39:29 +01:00