diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 6a1b609a0d9..6e8c527e07c 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -659,12 +659,14 @@ exit: | |||
659 | static struct usb_serial_driver *search_serial_device( | 659 | static struct usb_serial_driver *search_serial_device( |
660 | struct usb_interface *iface) | 660 | struct usb_interface *iface) |
661 | { | 661 | { |
662 | const struct usb_device_id *id; | 662 | const struct usb_device_id *id = NULL; |
663 | struct usb_serial_driver *drv; | 663 | struct usb_serial_driver *drv; |
664 | struct usb_driver *driver = to_usb_driver(iface->dev.driver); | ||
664 | 665 | ||
665 | /* Check if the usb id matches a known device */ | 666 | /* Check if the usb id matches a known device */ |
666 | list_for_each_entry(drv, &usb_serial_driver_list, driver_list) { | 667 | list_for_each_entry(drv, &usb_serial_driver_list, driver_list) { |
667 | id = get_iface_id(drv, iface); | 668 | if (drv->usb_driver == driver) |
669 | id = get_iface_id(drv, iface); | ||
668 | if (id) | 670 | if (id) |
669 | return drv; | 671 | return drv; |
670 | } | 672 | } |