mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
ALSA: hda/realtek: add missing NULL check for codec->bus->pci
In alc269_probe(), codec->bus->pci is dereferenced without a NULL check for the ALC236 vendor ID case. Add the missing check, consistent with the existing pattern used elsewhere in the same function. Signed-off-by: Bob Song <songxiebing@kylinos.cn> Link: https://patch.msgid.link/20260730015302.253008-2-songxiebing@kylinos.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -8977,6 +8977,7 @@ static int alc269_probe(struct hda_codec *codec, const struct hda_device_id *id)
|
||||
spec->init_hook = alc256_init;
|
||||
spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
|
||||
if (codec->core.vendor_id == 0x10ec0236 &&
|
||||
codec->bus->pci &&
|
||||
codec->bus->pci->vendor != PCI_VENDOR_ID_AMD)
|
||||
spec->en_3kpull_low = false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user