From: Sudip Mukherjee Date: Thu, 7 Apr 2016 15:35:07 +0000 (+0530) Subject: usb: wusbcore: remove unreachable code X-Git-Tag: v4.7-rc1~93^2~69^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ce04cff59d510c88bfa0745202281cf3c6417ae;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c index 3f4f5fbded55b..bf9551735938c 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: