Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1373488

[PATCH] usb: wusbcore: remove unreachable code

From Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] usb: wusbcore: remove unreachable code
Date 2016-04-07 17:40 +0200
Message-ID <rlkci-61P-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/usb/wusbcore/devconnect.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c
index 3f4f5fb..bf95517 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:
-- 
1.9.1

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] usb: wusbcore: remove unreachable code Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-04-07 17:40 +0200

csiph-web