diff options
author | dim <dim@FreeBSD.org> | 2013-04-13 21:21:13 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-13 21:21:13 +0000 |
commit | 6a5be05861061839894b4f8a1f31c03093684f2a (patch) | |
tree | 1b1dfdcf875c16318c2d61b2fa2d2f7dd55e03ec /sys/arm/xscale/ixp425/avila_gpio.c | |
parent | b9f17d62db67c67d9d2177347bc75b306530943b (diff) | |
download | FreeBSD-src-6a5be05861061839894b4f8a1f31c03093684f2a.zip FreeBSD-src-6a5be05861061839894b4f8a1f31c03093684f2a.tar.gz |
Fix undefined behaviour in several gpio_pin_setflags() routines (under
sys/arm and sys/mips), squelching the clang 3.3 warnings about this.
Noticed by: tinderbox and many irate spectators
Submitted by: Luiz Otavio O Souza <loos.br@gmail.com>
PR: kern/177759
MFC after: 3 days
Diffstat (limited to 'sys/arm/xscale/ixp425/avila_gpio.c')
-rw-r--r-- | sys/arm/xscale/ixp425/avila_gpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm/xscale/ixp425/avila_gpio.c b/sys/arm/xscale/ixp425/avila_gpio.c index dc4e33a..8be9948 100644 --- a/sys/arm/xscale/ixp425/avila_gpio.c +++ b/sys/arm/xscale/ixp425/avila_gpio.c @@ -220,8 +220,8 @@ avila_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & mask)) return (EINVAL); - /* Filter out unwanted flags */ - if ((flags &= sc->sc_pins[pin].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->sc_pins[pin].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together */ |