summaryrefslogtreecommitdiff
path: root/drivers/usb/class/usbtmc.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-02 19:31:18 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-02 19:31:18 +0200
commit7a81146204859c6f8d8daf3ab7a25af17dfecd5f (patch)
tree6bcd14e38f8f44621521faf66565a97ee6ad461e /drivers/usb/class/usbtmc.c
parent96e46dcfb8534494859936b3da4f3018de53a53f (diff)
parent089cf7f6ecb266b6a4164919a2e69bd2f938374a (diff)
Merge 5.3-rc7 into usb-next
We need the usb fixes in here for testing Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/class/usbtmc.c')
-rw-r--r--drivers/usb/class/usbtmc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 7ff831f2fd21..dcd7066ffba2 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -2359,8 +2359,11 @@ static int usbtmc_probe(struct usb_interface *intf,
goto err_put;
}
+ retcode = -EINVAL;
data->bulk_in = bulk_in->bEndpointAddress;
data->wMaxPacketSize = usb_endpoint_maxp(bulk_in);
+ if (!data->wMaxPacketSize)
+ goto err_put;
dev_dbg(&intf->dev, "Found bulk in endpoint at %u\n", data->bulk_in);
data->bulk_out = bulk_out->bEndpointAddress;