linux/sound
wangdicheng 49c2c59245 ALSA: hda/conexant: Fix missing error check for jack detection
[ Upstream commit b0e2333a23 ]

In cx_probe(), the return value of snd_hda_jack_detect_enable_callback()
is ignored. This function returns a pointer, and if it fails (e.g., due
to memory allocation failure), it returns an error pointer which must
be checked using IS_ERR().

If the registration fails, the driver continues to probe, but the jack
detection callback will not be registered. This can lead to a kernel
crash later when the driver attempts to handle jack events or accesses
the uninitialized structure.

Check the return value using IS_ERR() and propagate the error via
PTR_ERR() to the probe caller.

Fixes: 7aeb259086 ("ALSA: hda/conexant: Fix headset auto detect fail in cx8070 and SN6140")
Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20260428080450.108801-1-wangdich9700@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-06-01 17:35:43 +02:00
..
ac97 bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
aoa ALSA: aoa: i2sbus: fix OF node lifetime handling 2026-06-01 17:35:15 +02:00
arm ALSA: pxa2xx: Use managed PCM buffer allocation 2021-08-04 08:08:21 +02:00
atmel ALSA: atmel: ac97: clarify operator precedence 2020-09-03 09:27:34 +02:00
core ALSA: core: Validate compress device numbers without dynamic minors 2026-06-01 17:35:30 +02:00
drivers ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt 2022-12-31 13:14:16 +01:00
firewire ALSA: firewire-tascam: Do not drop unread control events 2026-06-01 17:35:20 +02:00
hda ASoC: Intel: sst: Support LPE0F28 ACPI HID 2024-12-14 19:50:39 +01:00
i2c ALSA: i2c/cs8427: fix iec958 mixer control deactivation 2023-04-20 12:13:51 +02:00
isa ALSA: sc6000: Keep the programmed board state in card-private data 2026-06-01 17:35:32 +02:00
mips ALSA: n64: check return value after calling platform_get_resource() 2021-06-12 09:31:13 +02:00
oss sound/oss/dmasound: fix 'dmasound_setup' defined but not used 2023-05-11 23:00:40 +09:00
parisc parisc architecture updates for kernel 5.15: 2021-09-02 13:16:00 -07:00
pci ALSA: hda/conexant: Fix missing error check for jack detection 2026-06-01 17:35:43 +02:00
pcmcia ALSA: pcmcia: Fix resource leak in snd_pdacf_probe error path 2026-01-19 13:09:46 +01:00
ppc ALSA: ppc: fix error return code in snd_pmac_probe() 2021-06-16 08:52:29 +02:00
sh ALSA: sh: SND_AICA should depend on SH_DMA_API 2025-05-22 14:08:22 +02:00
soc ASoC: codecs: ab8500: Fix casting of private data 2026-06-01 17:35:42 +02:00
sparc ALSA: sparc: Fix assignment in if condition 2021-06-09 17:30:29 +02:00
spi ALSA: spi: Add check for clk_enable() 2022-04-08 14:23:19 +02:00
synth ALSA: emux: improve patch ioctl data validation 2024-07-05 09:14:43 +02:00
usb sound: ua101: fix division by zero at probe 2026-06-01 17:35:21 +02:00
virtio sound/virtio: Fix cancel_sync warnings on uninitialized work_structs 2025-05-02 07:44:35 +02:00
x86 ALSA: intel_hdmi: Fix off-by-one error in __hdmi_lpe_audio_probe() 2025-08-28 16:24:14 +02:00
xen module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ac97_bus.c ALSA: ac97: Treat snd_ac97_bus_ops as const 2020-01-03 09:24:08 +01:00
Kconfig sound: Make CONFIG_SND depend on INDIRECT_IOMEM instead of UML 2024-11-17 15:06:25 +01:00
last.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
Makefile ALSA: virtio: add virtio sound driver 2021-03-07 09:07:16 +01:00
sound_core.c sound: fix a memory leak bug 2019-08-08 08:18:32 +02:00