diff options
-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 5d7b71b9614..6f81aa59318 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -669,12 +669,14 @@ exit: | |||
669 | static struct usb_serial_driver *search_serial_device( | 669 | static struct usb_serial_driver *search_serial_device( |
670 | struct usb_interface *iface) | 670 | struct usb_interface *iface) |
671 | { | 671 | { |
672 | const struct usb_device_id *id; | 672 | const struct usb_device_id *id = NULL; |
673 | struct usb_serial_driver *drv; | 673 | struct usb_serial_driver *drv; |
674 | struct usb_driver *driver = to_usb_driver(iface->dev.driver); | ||
674 | 675 | ||
675 | /* Check if the usb id matches a known device */ | 676 | /* Check if the usb id matches a known device */ |
676 | list_for_each_entry(drv, &usb_serial_driver_list, driver_list) { | 677 | list_for_each_entry(drv, &usb_serial_driver_list, driver_list) { |
677 | id = get_iface_id(drv, iface); | 678 | if (drv->usb_driver == driver) |
679 | id = get_iface_id(drv, iface); | ||
678 | if (id) | 680 | if (id) |
679 | return drv; | 681 | return drv; |
680 | } | 682 | } |