From: Takashi Iwai <tiwai@suse.de>
To: wangdich9700@163.com
Cc: tiwai@suse.com, bo.liu@senarytech.com,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
alsa-devel@alsa-project.org, wangdicheng <wangdicheng@kylinos.cn>
Subject: Re: [PATCH v2] ALSA: hda/conexant: Fix missing error check for jack detection
Date: Wed, 29 Apr 2026 07:50:01 +0200 [thread overview]
Message-ID: <877bpqqprq.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260428080450.108801-1-wangdich9700@163.com>
On Tue, 28 Apr 2026 10:04:50 +0200,
wangdich9700@163.com wrote:
>
> From: wangdicheng <wangdicheng@kylinos.cn>
>
> 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>
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2026-04-29 5:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 8:04 [PATCH v2] ALSA: hda/conexant: Fix missing error check for jack detection wangdich9700
2026-04-29 5:50 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877bpqqprq.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=bo.liu@senarytech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=wangdich9700@163.com \
--cc=wangdicheng@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox