diff options
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-wdm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index d1e4a7379beb..2c63c051c612 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -868,9 +868,10 @@ static int wdm_create(struct usb_interface *intf, struct usb_endpoint_descriptor INIT_WORK(&desc->rxwork, wdm_rxwork); INIT_WORK(&desc->service_outs_intr, service_interrupt_work); - rv = -EINVAL; - if (!usb_endpoint_is_int_in(ep)) + if (!usb_endpoint_is_int_in(ep)) { + rv = -EINVAL; goto err; + } desc->wMaxPacketSize = usb_endpoint_maxp(ep); |