From: Dan Carpenter Date: Mon, 13 Aug 2012 16:57:03 +0000 (+0300) Subject: xhci: Fix a logical vs bitwise AND bug X-Git-Tag: firefly_0821_release~7541^2~652 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c0a168c0f20189efc03264785edd55baf00d5acc;p=firefly-linux-kernel-4.4.55.git xhci: Fix a logical vs bitwise AND bug commit 052c7f9ffb0e95843e75448d02664459253f9ff8 upstream. The intent was to test whether the flag was set. This patch should be backported to stable kernels as old as 3.0, since it fixes a bug in commit e95829f474f0db3a4d940cae1423783edd966027 "xhci: Switch PPT ports to EHCI on shutdown.", which was marked for stable. Signed-off-by: Dan Carpenter Signed-off-by: Sarah Sharp Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 1f9602ad39e5..afafd20e21b5 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -594,7 +594,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);