summaryrefslogtreecommitdiff
path: root/include/linux/node.h
diff options
context:
space:
mode:
authorwangdicheng <wangdicheng@kylinos.cn>2026-04-28 16:04:50 +0800
committerTakashi Iwai <tiwai@suse.de>2026-04-29 07:49:44 +0200
commitb0e2333a231107adedd38c6fcfe1adc6162716fc (patch)
treedfe55fa1a9b86fb98c136abbcee7738627690ea4 /include/linux/node.h
parent077c593dacf7ee33511468e4f29417d795cf07a4 (diff)
ALSA: hda/conexant: Fix missing error check for jack detection
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: 7aeb25908648 ("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>
Diffstat (limited to 'include/linux/node.h')
0 files changed, 0 insertions, 0 deletions