diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-12-15 21:04:52 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 23:44:33 (GMT) |
commit | 1737bf2c5e78e331ad0a30b8c34edd1016d043c0 (patch) | |
tree | 61a006ad39781d02c3a4bfdca04497beee078370 /drivers/usb/core/message.c | |
parent | 2360e4aa64da412c29136113f8050b6aa9e757b8 (diff) | |
download | linux-1737bf2c5e78e331ad0a30b8c34edd1016d043c0.tar.xz |
usbcore: remove unneeded error check
This patch (as830) removes some unnecessary error checking. According
to the kerneldoc, schedule_work() can't fail.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/message.c')
-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 149aa8b..8aca357 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) INIT_WORK(&req->work, driver_set_config_work); usb_get_dev(udev); - if (!schedule_work(&req->work)) { - usb_put_dev(udev); - kfree(req); - return -EINVAL; - } + schedule_work(&req->work); return 0; } EXPORT_SYMBOL_GPL(usb_driver_set_configuration); |