All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: host: ohci-pxa27x: Fix and & vs | typo
@ 2018-02-23 12:33 ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2018-02-23 12:33 UTC (permalink / raw)
  To: Alan Stern; +Cc: Greg Kroah-Hartman, linux-usb, kernel-janitors

The code is supposed to clear the RH_A_NPS and RH_A_PSM bits, but it's
a no-op because of the & vs | typo.  This bug predates git and it was
only discovered using static analysis so it must not affect too many
people in real life.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Not tested.

diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index 3e2474959735..7679fb583e41 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -148,7 +148,7 @@ static int pxa27x_ohci_select_pmm(struct pxa27x_ohci *pxa_ohci, int mode)
 		uhcrhda |= RH_A_NPS;
 		break;
 	case PMM_GLOBAL_MODE:
-		uhcrhda &= ~(RH_A_NPS & RH_A_PSM);
+		uhcrhda &= ~(RH_A_NPS | RH_A_PSM);
 		break;
 	case PMM_PERPORT_MODE:
 		uhcrhda &= ~(RH_A_NPS);

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-08-17  6:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-23 12:33 [PATCH] usb: host: ohci-pxa27x: Fix and & vs | typo Dan Carpenter
2018-02-23 12:33 ` Dan Carpenter
2019-08-14 14:04 ` [PATCH] " Dan Carpenter
2019-08-14 14:04   ` Dan Carpenter
2019-08-15 12:36   ` Greg Kroah-Hartman
2019-08-15 12:36     ` Greg Kroah-Hartman
2019-08-14 14:46 ` Alan Stern
2019-08-14 14:46   ` Alan Stern
2019-08-17  6:55 ` Dan Carpenter
2019-08-17  6:55   ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.