aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/phidgetmotorcontrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/phidgetmotorcontrol.c')
-rw-r--r--drivers/usb/misc/phidgetmotorcontrol.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/misc/phidgetmotorcontrol.c b/drivers/usb/misc/phidgetmotorcontrol.c
index 5c780cab92e0..c3469b0a67c2 100644
--- a/drivers/usb/misc/phidgetmotorcontrol.c
+++ b/drivers/usb/misc/phidgetmotorcontrol.c
@@ -323,7 +323,7 @@ static int motorcontrol_probe(struct usb_interface *intf, const struct usb_devic
323 return -ENODEV; 323 return -ENODEV;
324 324
325 endpoint = &interface->endpoint[0].desc; 325 endpoint = &interface->endpoint[0].desc;
326 if (!(endpoint->bEndpointAddress & 0x80)) 326 if (!usb_endpoint_dir_in(endpoint))
327 return -ENODEV; 327 return -ENODEV;
328 328
329 /* 329 /*
@@ -392,8 +392,7 @@ out2:
392 device_remove_file(mc->dev, &dev_attrs[i]); 392 device_remove_file(mc->dev, &dev_attrs[i]);
393out: 393out:
394 if (mc) { 394 if (mc) {
395 if (mc->irq) 395 usb_free_urb(mc->irq);
396 usb_free_urb(mc->irq);
397 if (mc->data) 396 if (mc->data)
398 usb_buffer_free(dev, URB_INT_SIZE, mc->data, mc->data_dma); 397 usb_buffer_free(dev, URB_INT_SIZE, mc->data, mc->data_dma);
399 if (mc->dev) 398 if (mc->dev)