]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
USB: FHCI: avoid redundant condition
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 8 May 2016 22:15:31 +0000 (00:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2016 11:08:46 +0000 (13:08 +0200)
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>
drivers/usb/host/fhci-sched.c

index a9609a336efef1f3b8c0d108121bc793a5717fee..2f162faabbca89ead7fbb01fa809e2367b64b7ae 100644 (file)
@@ -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) {