Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Heinrich Schuchardt and committed by
Greg Kroah-Hartman
2b4ba254 f879fc32

+1 -1
+1 -1
drivers/usb/host/fhci-sched.c
··· 288 288 list_for_each_entry(ed, list, node) { 289 289 td = ed->td_head; 290 290 291 - if (!td || (td && td->status == USB_TD_INPROGRESS)) 291 + if (!td || td->status == USB_TD_INPROGRESS) 292 292 continue; 293 293 294 294 if (ed->state != FHCI_ED_OPER) {