Explorar el Código

USB: FHCI: avoid redundant condition

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Heinrich Schuchardt hace 9 años
padre
commit
2b4ba254d2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      drivers/usb/host/fhci-sched.c

+ 1 - 1
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) {