diff options
Diffstat (limited to 'drivers/usb/misc/phidgetmotorcontrol.c')
-rw-r--r-- | drivers/usb/misc/phidgetmotorcontrol.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/misc/phidgetmotorcontrol.c b/drivers/usb/misc/phidgetmotorcontrol.c index 5c780ca..c3469b0 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 return -ENODEV; endpoint = &interface->endpoint[0].desc; - if (!(endpoint->bEndpointAddress & 0x80)) + if (!usb_endpoint_dir_in(endpoint)) return -ENODEV; /* @@ -392,8 +392,7 @@ out2: device_remove_file(mc->dev, &dev_attrs[i]); out: if (mc) { - if (mc->irq) - usb_free_urb(mc->irq); + usb_free_urb(mc->irq); if (mc->data) usb_buffer_free(dev, URB_INT_SIZE, mc->data, mc->data_dma); if (mc->dev) |