]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
xhci: simplify if statement to make it more readable
authorMathias Nyman <mathias.nyman@linux.intel.com>
Mon, 23 Jan 2017 12:19:51 +0000 (14:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Jan 2017 09:57:34 +0000 (10:57 +0100)
No functional change, De Morgan !(A && B) = (!A || !B)

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c

index e32029a31ca4d2ed5856c18e6e10b4b40de1132a..46df89eadb56182b76e3d1b4fe4cef688c8abca1 100644 (file)
@@ -913,7 +913,8 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg)
        spin_lock_irqsave(&xhci->lock, flags);
 
        ep->stop_cmds_pending--;
-       if (!(ep->stop_cmds_pending == 0 && (ep->ep_state & EP_HALT_PENDING))) {
+
+       if (ep->stop_cmds_pending || !(ep->ep_state & EP_HALT_PENDING)) {
                xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
                                "Stop EP timer ran, but no command pending, "
                                "exiting.");