diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/core/message.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 149aa8bfb1fe..8aca3574c2b5 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -1545,11 +1545,7 @@ int usb_driver_set_configuration(struct usb_device *udev, int config) | |||
1545 | INIT_WORK(&req->work, driver_set_config_work); | 1545 | INIT_WORK(&req->work, driver_set_config_work); |
1546 | 1546 | ||
1547 | usb_get_dev(udev); | 1547 | usb_get_dev(udev); |
1548 | if (!schedule_work(&req->work)) { | 1548 | schedule_work(&req->work); |
1549 | usb_put_dev(udev); | ||
1550 | kfree(req); | ||
1551 | return -EINVAL; | ||
1552 | } | ||
1553 | return 0; | 1549 | return 0; |
1554 | } | 1550 | } |
1555 | EXPORT_SYMBOL_GPL(usb_driver_set_configuration); | 1551 | EXPORT_SYMBOL_GPL(usb_driver_set_configuration); |