summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pciusb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pciusb.c b/pciusb.c
index 311c8fa..b482b22 100644
--- a/pciusb.c
+++ b/pciusb.c
@@ -122,9 +122,11 @@ extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciu
}
if (strncmp(p, "unknown", q-p-1))
e->module = strndup(p,q-p-1);
-
- ifree(e->text); /* usb.c set it so that we display something when usbtable doesn't refer that hw*/
- e->text = strndup(q+2, strlen(q)-4);
+ /* special case for buggy 0x0 usb entry */
+ if (vendor != 0 && device != 0 && e->class_ != 0x90000d) { /* Hub class */
+ ifree(e->text); /* usb.c set it so that we display something when usbtable doesn't refer that hw*/
+ e->text = strndup(q+2, strlen(q)-4);
+ }
/* if subids read on pcitable line, we know that subids matches :
(see "subids differ" test above) */
if (nb == 4)