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>
This commit is contained in:
parent
2360e4aa64
commit
1737bf2c5e
1 changed files with 1 additions and 5 deletions
|
@ -1545,11 +1545,7 @@ int usb_driver_set_configuration(struct usb_device *udev, int config)
|
||||||
INIT_WORK(&req->work, driver_set_config_work);
|
INIT_WORK(&req->work, driver_set_config_work);
|
||||||
|
|
||||||
usb_get_dev(udev);
|
usb_get_dev(udev);
|
||||||
if (!schedule_work(&req->work)) {
|
schedule_work(&req->work);
|
||||||
usb_put_dev(udev);
|
|
||||||
kfree(req);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(usb_driver_set_configuration);
|
EXPORT_SYMBOL_GPL(usb_driver_set_configuration);
|
||||||
|
|
Loading…
Add table
Reference in a new issue