From: Alan Stern Date: Fri, 15 Dec 2006 21:04:52 +0000 (-0500) Subject: usbcore: remove unneeded error check X-Git-Tag: v2.6.21-rc2~42^2~9^2~54 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1737bf2c5e78e331ad0a30b8c34edd1016d043c0;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 149aa8bfb1f..8aca3574c2b 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);