Skip to contentSkip to conversation

xhci: Fix a logical vs bitwise AND bug

PATCH New Dan Carpenter 1 participant 1 message Aug 13, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xhci: Fix a logical vs bitwise AND bug

The intent was to test whether the flag was set.

drivers/usb/host/xhci.c +1 -1
index c59d5b5..617b0a7 100644
@@ -659,7 +659,7 @@ void xhci_shutdown(struct usb_hcd *hcd)
 {
 	struct xhci_hcd *xhci = hcd_to_xhci(hcd);
 
-	if (xhci->quirks && XHCI_SPURIOUS_REBOOT)
+	if (xhci->quirks & XHCI_SPURIOUS_REBOOT)
 		usb_disable_xhci_ports(to_pci_dev(hcd->self.controller));
 
 	spin_lock_irq(&xhci->lock);