diff options
Diffstat (limited to 'drivers/usb/misc/phidgetkit.c')
-rw-r--r-- | drivers/usb/misc/phidgetkit.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c index 33e716c6a79b..9659c79e187e 100644 --- a/drivers/usb/misc/phidgetkit.c +++ b/drivers/usb/misc/phidgetkit.c | |||
@@ -554,7 +554,7 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic | |||
554 | return -ENODEV; | 554 | return -ENODEV; |
555 | 555 | ||
556 | endpoint = &interface->endpoint[0].desc; | 556 | endpoint = &interface->endpoint[0].desc; |
557 | if (!(endpoint->bEndpointAddress & 0x80)) | 557 | if (!usb_endpoint_dir_in(endpoint)) |
558 | return -ENODEV; | 558 | return -ENODEV; |
559 | /* | 559 | /* |
560 | * bmAttributes | 560 | * bmAttributes |
@@ -653,8 +653,7 @@ out2: | |||
653 | device_remove_file(kit->dev, &dev_output_attrs[i]); | 653 | device_remove_file(kit->dev, &dev_output_attrs[i]); |
654 | out: | 654 | out: |
655 | if (kit) { | 655 | if (kit) { |
656 | if (kit->irq) | 656 | usb_free_urb(kit->irq); |
657 | usb_free_urb(kit->irq); | ||
658 | if (kit->data) | 657 | if (kit->data) |
659 | usb_buffer_free(dev, URB_INT_SIZE, kit->data, kit->data_dma); | 658 | usb_buffer_free(dev, URB_INT_SIZE, kit->data, kit->data_dma); |
660 | if (kit->dev) | 659 | if (kit->dev) |