ALSA: hda controller - handle -1 value as error in snd_hdac_bus_parse_capabilities()
Jaroslav Kysela
maintainerPATCH 1/1 ALSA: hda controller - handle -1 value as error in snd_hdac_bus_parse_capabilities()
We have seen this value on a development platform.
Signed-off-by Jaroslav Kysela <[email protected]>
--- sound/hda/hdac_controller.c | 5 +++++ 1 file changed, 5 insertions(+)
sound/hda/hdac_controller.c +5 -0
@@ -278,6 +278,11 @@ int snd_hdac_bus_parse_capabilities(struct hdac_bus *bus) do { cur_cap = _snd_hdac_chip_readl(bus, offset); + if (cur_cap == 0xffffffff) { + dev_dbg(bus->dev, "Wrong capability -1\n"); + break; + } + dev_dbg(bus->dev, "Capability version: 0x%x\n", (cur_cap & AZX_CAP_HDR_VER_MASK) >> AZX_CAP_HDR_VER_OFF);
Signature · 1 line
2.13.6
Quoted 4 lines · Jaroslav Kysela
We have seen this value on a development platform.
Signed-off-by Jaroslav Kysela <[email protected]>
Thanks, but this was already fixed in the last week :) The fix commit is
098a0a62c1554f5a3813ef1b8539563214ada8f6
and it'll be backported to stable kernels.
Takashi
Quoted 23 lines
--- sound/hda/hdac_controller.c | 5 +++++ 1 file changed, 5 insertions(+)sound/hda/hdac_controller.c +5
-0@@ -278,6 +278,11 @@ int snd_hdac_bus_parse_capabilities(struct hdac_bus *bus) do { cur_cap = _snd_hdac_chip_readl(bus, offset); + if (cur_cap == 0xffffffff) { + dev_dbg(bus->dev, "Wrong capability -1\n"); + break; + } + dev_dbg(bus->dev, "Capability version: 0x%x\n", (cur_cap & AZX_CAP_HDR_VER_MASK) >> AZX_CAP_HDR_VER_OFF);Signature · 1 line
2.13.6