diff options
Diffstat (limited to 'drivers/usb/class/usbtmc.c')
-rw-r--r-- | drivers/usb/class/usbtmc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 4942122b2346..36858ddd8d9b 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c | |||
@@ -2362,8 +2362,11 @@ static int usbtmc_probe(struct usb_interface *intf, | |||
2362 | goto err_put; | 2362 | goto err_put; |
2363 | } | 2363 | } |
2364 | 2364 | ||
2365 | retcode = -EINVAL; | ||
2365 | data->bulk_in = bulk_in->bEndpointAddress; | 2366 | data->bulk_in = bulk_in->bEndpointAddress; |
2366 | data->wMaxPacketSize = usb_endpoint_maxp(bulk_in); | 2367 | data->wMaxPacketSize = usb_endpoint_maxp(bulk_in); |
2368 | if (!data->wMaxPacketSize) | ||
2369 | goto err_put; | ||
2367 | dev_dbg(&intf->dev, "Found bulk in endpoint at %u\n", data->bulk_in); | 2370 | dev_dbg(&intf->dev, "Found bulk in endpoint at %u\n", data->bulk_in); |
2368 | 2371 | ||
2369 | data->bulk_out = bulk_out->bEndpointAddress; | 2372 | data->bulk_out = bulk_out->bEndpointAddress; |