Commit 7ce04cff authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Greg Kroah-Hartman

usb: wusbcore: remove unreachable code

The call to wusb_dev_sysfs_rm() which is just after return will never
be executed. On checking the code, wusb_dev_sysfs_add() is the last one
to be executed so even if that fails we do not need wusb_dev_sysfs_rm()
in the error path.
Signed-off-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bb7871ad
......@@ -893,7 +893,6 @@ static void wusb_dev_add_ncb(struct usb_device *usb_dev)
error_nodev:
return;
wusb_dev_sysfs_rm(wusb_dev);
error_add_sysfs:
wusb_dev_bos_rm(wusb_dev);
error_bos_add:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment