Skip to content

Commit

Permalink
usbcore: remove unneeded error check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Feb 7, 2007
1 parent 2360e4a commit 1737bf2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/usb/core/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1737bf2

Please sign in to comment.