diff options
-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, | |||
73 | if (fields > 4) { | 73 | if (fields > 4) { |
74 | const struct usb_device_id *id = id_table; | 74 | const struct usb_device_id *id = id_table; |
75 | 75 | ||
76 | if (!id) | ||
77 | return -ENODEV; | ||
78 | |||
76 | for (; id->match_flags; id++) | 79 | for (; id->match_flags; id++) |
77 | if (id->idVendor == refVendor && id->idProduct == refProduct) | 80 | if (id->idVendor == refVendor && id->idProduct == refProduct) |
78 | break; | 81 | break; |