public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: usb: early: remove unused code
@ 2017-02-08  6:18 Gustavo A. R. Silva
  0 siblings, 0 replies; only message in thread
From: Gustavo A. R. Silva @ 2017-02-08  6:18 UTC (permalink / raw)
  To: gregkh, paul.gortmaker, yamada.masahiro, akpm; +Cc: linux-usb, linux-kernel

Remove this line of code because devnum is overwritten before it can be used.
This could happen if line of code 609 (goto try_again;) is executed. Otherwise,
devnum is never used again.

Addresses-Coverity-ID: 1226870
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/usb/early/ehci-dbgp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/early/ehci-dbgp.c b/drivers/usb/early/ehci-dbgp.c
index ea73afb..e265444 100644
--- a/drivers/usb/early/ehci-dbgp.c
+++ b/drivers/usb/early/ehci-dbgp.c
@@ -580,7 +580,6 @@ static int _dbgp_external_startup(void)
 				USB_DEBUG_DEVNUM);
 			goto err;
 		}
-		devnum = USB_DEBUG_DEVNUM;
 		dbgp_printk("debug device renamed to 127\n");
 	}
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-08  6:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-08  6:18 [PATCH] drivers: usb: early: remove unused code Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox