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 0385ffcc7419..2bb4fa572bb7 100644
--- a/drivers/usb/misc/phidgetmotorcontrol.c
+++ b/drivers/usb/misc/phidgetmotorcontrol.c
@@ -324,7 +324,7 @@ static int motorcontrol_probe(struct usb_interface *intf, const struct usb_devic
324 return -ENODEV; 324 return -ENODEV;
325 325
326 endpoint = &interface->endpoint[0].desc; 326 endpoint = &interface->endpoint[0].desc;
327 if (!(endpoint->bEndpointAddress & 0x80)) 327 if (!usb_endpoint_dir_in(endpoint))
328 return -ENODEV; 328 return -ENODEV;
329 329
330 /* 330 /*
@@ -393,8 +393,7 @@ out2:
393 device_remove_file(mc->dev, &dev_attrs[i]); 393 device_remove_file(mc->dev, &dev_attrs[i]);
394out: 394out:
395 if (mc) { 395 if (mc) {
396 if (mc->irq) 396 usb_free_urb(mc->irq);
397 usb_free_urb(mc->irq);
398 if (mc->data) 397 if (mc->data)
399 usb_buffer_free(dev, URB_INT_SIZE, mc->data, mc->data_dma); 398 usb_buffer_free(dev, URB_INT_SIZE, mc->data, mc->data_dma);
400 if (mc->dev) 399 if (mc->dev)