diff options
Diffstat (limited to 'drivers/usb/core/driver.c')
-rw-r--r-- | drivers/usb/core/driver.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 620a0baf103e..5d01558cef66 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -73,6 +73,9 @@ ssize_t usb_store_new_id(struct usb_dynids *dynids, if (fields > 4) { const struct usb_device_id *id = id_table; + if (!id) + return -ENODEV; + for (; id->match_flags; id++) if (id->idVendor == refVendor && id->idProduct == refProduct) break; |