Re: [PATCH v2] ALSA: hda/realtek: add missing error checks for COEF index reads in alc269

Takashi Iwai <[email protected]>
Newsgroups org.kernel.vger.linux-sound,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, 30 Jul 2026 03:53:01 +0200,
songxiebing wrote:
> 
> From: Bob Song <[email protected]>
> 
> 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 <[email protected]>
> ---
> v2:
>  - Separate processing of return values from reading COEF and
> null pointer detection for device.

Applied to for-next branch.  Thanks.


Takashi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.