summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2017-01-23 14:19:51 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-25 10:57:34 +0100
commit505f581c48bc27cd72beb42df47b3012b617ea5c (patch)
tree7c98e6d898240f1518ce4dff94e896528392360c /drivers/usb/host
parent92190e365a28b0c15685a23750c20433902d026d (diff)
downloadlinux-505f581c48bc27cd72beb42df47b3012b617ea5c.tar.gz
linux-505f581c48bc27cd72beb42df47b3012b617ea5c.tar.bz2
linux-505f581c48bc27cd72beb42df47b3012b617ea5c.zip
xhci: simplify if statement to make it more readable
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>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/xhci-ring.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index e32029a31ca4..46df89eadb56 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -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.");