Skip to contentSkip to conversation

usb: wusbcore: remove unreachable code

PATCH New Sudip Mukherjee 1 participant 1 message Apr 7, 2016 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/usb/wusbcore/devconnect.c | 1 -
 1 file changed, 1 deletion(-)
drivers/usb/wusbcore/devconnect.c +0 -1
index 3f4f5fb..bf95517 100644
@@ -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:
Signature · 1 line
1.9.1