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


Groups > linux.kernel > #1396503 > unrolled thread

[PATCH 1/1] USB: FHCI: avoid redundant condition

Started byHeinrich Schuchardt <xypron.glpk@gmx.de>
First post2016-05-09 00:20 +0200
Last post2016-05-09 00:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] USB: FHCI: avoid redundant condition Heinrich Schuchardt <xypron.glpk@gmx.de> - 2016-05-09 00:20 +0200

#1396503 — [PATCH 1/1] USB: FHCI: avoid redundant condition

FromHeinrich Schuchardt <xypron.glpk@gmx.de>
Date2016-05-09 00:20 +0200
Subject[PATCH 1/1] USB: FHCI: avoid redundant condition
Message-ID<rwFdo-77R-11@gated-at.bofh.it>
The right part of the following or expression is only evaluated if
td is nonzero.
!td || (td && td.status == USB_TD_INPROGRESS)
So no need to check td again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/usb/host/fhci-sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/fhci-sched.c b/drivers/usb/host/fhci-sched.c
index a9609a3..2f162fa 100644
--- a/drivers/usb/host/fhci-sched.c
+++ b/drivers/usb/host/fhci-sched.c
@@ -288,7 +288,7 @@ static int scan_ed_list(struct fhci_usb *usb,
 	list_for_each_entry(ed, list, node) {
 		td = ed->td_head;
 
-		if (!td || (td && td->status == USB_TD_INPROGRESS))
+		if (!td || td->status == USB_TD_INPROGRESS)
 			continue;
 
 		if (ed->state != FHCI_ED_OPER) {
-- 
2.1.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web