diff options
Diffstat (limited to 'lib/libusb/libusb10.c')
-rw-r--r-- | lib/libusb/libusb10.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c index 79a570e..c795ecf 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -611,7 +611,6 @@ int libusb_claim_interface(struct libusb20_device *pdev, int interface_number) { libusb_device *dev; - int err = 0; dev = libusb_get_device(pdev); if (dev == NULL) @@ -621,13 +620,10 @@ libusb_claim_interface(struct libusb20_device *pdev, int interface_number) return (LIBUSB_ERROR_INVALID_PARAM); CTX_LOCK(dev->ctx); - if (dev->claimed_interfaces & (1 << interface_number)) - err = LIBUSB_ERROR_BUSY; - - if (!err) - dev->claimed_interfaces |= (1 << interface_number); + dev->claimed_interfaces |= (1 << interface_number); CTX_UNLOCK(dev->ctx); - return (err); + + return (0); } int |