[alsa-devel] [PATCH v2] ALSA: hda: Abort capability probe on invalid capability

Ughreja, Rakesh A rakesh.a.ughreja at intel.com
Thu Oct 19 01:45:25 CEST 2017


From: Rakesh Ughreja <rakesh.a.ughreja at intel.com>

Due to bugs in BIOS it's possible that the HDA capability link
list is not constructed properly. This may lead to driver going
into unknown state. So whenever driver discovers unknown HDA
capability, log it as error and stop traversing the link list
further.

Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja at intel.com>
---
 sound/hda/hdac_controller.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c
index 978dc18..8f7d0d9 100644
--- a/sound/hda/hdac_controller.c
+++ b/sound/hda/hdac_controller.c
@@ -314,7 +314,8 @@ int snd_hdac_bus_parse_capabilities(struct hdac_bus *bus)
 			break;
 
 		default:
-			dev_dbg(bus->dev, "Unknown capability %d\n", cur_cap);
+			dev_err(bus->dev, "Unknown capability %d\n", cur_cap);
+			cur_cap = 0;
 			break;
 		}
 
-- 
2.7.4



More information about the Alsa-devel mailing list