diff options
| author | Andrew Goodbody <[email protected]> | 2025-09-30 17:06:44 +0100 |
|---|---|---|
| committer | Marek Vasut <[email protected]> | 2025-10-28 16:33:15 +0100 |
| commit | dd01b0541be38894c05f0dad2dad135ef1a9da6b (patch) | |
| tree | 8572700b9ea2251624bf7b6deea6d00e4cbc28cb | |
| parent | 08f4c52c97ab3db174ce292eb86309ee29be5f07 (diff) | |
usb: ulpi: Incorrect operator used
Combining two bits into a mask to be used so that the same write code
can be used to set or reset bits in a register clearly needs to use the
binary 'or' operator, not the binary 'and'. Fix it.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <[email protected]>
| -rw-r--r-- | drivers/usb/ulpi/ulpi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/ulpi/ulpi.c b/drivers/usb/ulpi/ulpi.c index 128adcbde13..0e0f0e4983d 100644 --- a/drivers/usb/ulpi/ulpi.c +++ b/drivers/usb/ulpi/ulpi.c @@ -127,7 +127,7 @@ int ulpi_set_vbus_indicator(struct ulpi_viewport *ulpi_vp, int external, if (val == ULPI_ERROR) return val; - val = val & ~(ULPI_IFACE_PASSTHRU & ULPI_IFACE_EXTVBUS_COMPLEMENT); + val = val & ~(ULPI_IFACE_PASSTHRU | ULPI_IFACE_EXTVBUS_COMPLEMENT); val |= flags; val = ulpi_write(ulpi_vp, &ulpi->iface_ctrl, val); if (val) |
