diff options
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/qmi_wwan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 68ca6769210f..484eaa5c8a5d 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c | |||
@@ -129,7 +129,6 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf) | |||
129 | struct usb_interface_descriptor *desc = &intf->cur_altsetting->desc; | 129 | struct usb_interface_descriptor *desc = &intf->cur_altsetting->desc; |
130 | struct usb_cdc_union_desc *cdc_union = NULL; | 130 | struct usb_cdc_union_desc *cdc_union = NULL; |
131 | struct usb_cdc_ether_desc *cdc_ether = NULL; | 131 | struct usb_cdc_ether_desc *cdc_ether = NULL; |
132 | u32 required = 1 << USB_CDC_HEADER_TYPE | 1 << USB_CDC_UNION_TYPE; | ||
133 | u32 found = 0; | 132 | u32 found = 0; |
134 | struct usb_driver *driver = driver_of(intf); | 133 | struct usb_driver *driver = driver_of(intf); |
135 | struct qmi_wwan_state *info = (void *)&dev->data; | 134 | struct qmi_wwan_state *info = (void *)&dev->data; |
@@ -197,7 +196,8 @@ next_desc: | |||
197 | } | 196 | } |
198 | 197 | ||
199 | /* did we find all the required ones? */ | 198 | /* did we find all the required ones? */ |
200 | if ((found & required) != required) { | 199 | if (!(found & (1 << USB_CDC_HEADER_TYPE)) || |
200 | !(found & (1 << USB_CDC_UNION_TYPE))) { | ||
201 | dev_err(&intf->dev, "CDC functional descriptors missing\n"); | 201 | dev_err(&intf->dev, "CDC functional descriptors missing\n"); |
202 | goto err; | 202 | goto err; |
203 | } | 203 | } |