summaryrefslogtreecommitdiff
path: root/drivers/usb/wusbcore
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2016-04-07 21:05:07 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-19 04:33:15 +0900
commit7ce04cff59d510c88bfa0745202281cf3c6417ae (patch)
tree21a7aeb68ea35902b3a7b171f521b29c0479b9f8 /drivers/usb/wusbcore
parentbb7871ad99ea814565c3d6b551e039c71f24cbb3 (diff)
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: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/wusbcore')
-rw-r--r--drivers/usb/wusbcore/devconnect.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c
index 3f4f5fbded55..bf9551735938 100644
--- a/drivers/usb/wusbcore/devconnect.c
+++ b/drivers/usb/wusbcore/devconnect.c
@@ -893,7 +893,6 @@ out:
error_nodev:
return;
- wusb_dev_sysfs_rm(wusb_dev);
error_add_sysfs:
wusb_dev_bos_rm(wusb_dev);
error_bos_add: