Re: [PATCH] ALSA: hda/realtek: add missing error checks in alc269 init/shutdown
Takashi Iwai <[email protected]>
| Newsgroups | org.kernel.vger.linux-sound,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 29 Jul 2026 08:38:03 +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 init 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 > > Also add a missing NULL check for codec->bus->pci in alc269_probe() > before dereferencing it, consistent with the existing checks in the > same function. > > Signed-off-by: Bob Song <[email protected]> Could you split the NULL check to another patch? Basically it's a completely different sort of fix from others. thanks, Takashi