From: Takashi Iwai <tiwai@suse.de>
To: songxiebing <songxiebing@kylinos.cn>
Cc: tiwai@suse.com, perex@perex.cz, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ALSA: hda/realtek: add missing error checks for COEF index reads in alc269
Date: Thu, 30 Jul 2026 11:35:26 +0200 [thread overview]
Message-ID: <87o6fo3jmp.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260730015302.253008-1-songxiebing@kylinos.cn>
On Thu, 30 Jul 2026 03:53:01 +0200,
songxiebing wrote:
>
> From: Bob Song <songxiebing@kylinos.cn>
>
> alc_read_coef_idx() and alc_read_coefex_idx() can return -1 on error
> via snd_hda_codec_read(). Several codec initialization and shutdown
> functions save these return values and later write them back to
> hardware registers without checking for errors, potentially corrupting
> COEF register state on a read failure.
>
> Add error checks in:
> - alc282_init() and alc282_shutup(): check coef78 before write-back
> - alc285_hp_init(): check coef38/coef0d/coef36 before update, check
> val before write-back, and break polling loop on error
> - alc294_hp_init(): break polling loop on read error
>
> Signed-off-by: Bob Song <songxiebing@kylinos.cn>
> ---
> v2:
> - Separate processing of return values from reading COEF and
> null pointer detection for device.
Applied to for-next branch. Thanks.
Takashi
prev parent reply other threads:[~2026-07-30 9:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 6:38 [PATCH] ALSA: hda/realtek: add missing error checks in alc269 init/shutdown songxiebing
2026-07-29 7:35 ` Takashi Iwai
2026-07-30 1:53 ` [PATCH v2] ALSA: hda/realtek: add missing error checks for COEF index reads in alc269 songxiebing
2026-07-30 1:53 ` [PATCH v2] ALSA: hda/realtek: add missing NULL check for codec->bus->pci songxiebing
2026-07-30 9:35 ` Takashi Iwai
2026-07-30 9:35 ` 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=87o6fo3jmp.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=songxiebing@kylinos.cn \
--cc=tiwai@suse.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.