Message ID | 1509940350-5770-2-git-send-email-hui.wang@canonical.com |
---|---|
State | New |
Headers | show |
Series | [Z/A/linux-eom] ALSA: hda: Abort capability probe at invalid register read | expand |
diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c index 978dc18..f6d2985 100644 --- a/sound/hda/hdac_controller.c +++ b/sound/hda/hdac_controller.c @@ -284,6 +284,11 @@ int snd_hdac_bus_parse_capabilities(struct hdac_bus *bus) dev_dbg(bus->dev, "HDA capability ID: 0x%x\n", (cur_cap & AZX_CAP_HDR_ID_MASK) >> AZX_CAP_HDR_ID_OFF); + if (cur_cap == -1) { + dev_dbg(bus->dev, "Invalid capability reg read\n"); + break; + } + switch ((cur_cap & AZX_CAP_HDR_ID_MASK) >> AZX_CAP_HDR_ID_OFF) { case AZX_ML_CAP_ID: dev_dbg(bus->dev, "Found ML capability\n");