ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
[pandora-kernel.git] / sound / pci / hda / hda_proc.c
index 2c981b5..254ab52 100644 (file)
@@ -54,6 +54,8 @@ static const char *get_wid_type_name(unsigned int wid_value)
                [AC_WID_BEEP] = "Beep Generator Widget",
                [AC_WID_VENDOR] = "Vendor Defined Widget",
        };
+       if (wid_value == -1)
+               return "UNKNOWN Widget";
        wid_value &= 0xf;
        if (names[wid_value])
                return names[wid_value];