aboutsummaryrefslogtreecommitdiff
path: root/sys/mips/atheros
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-04-13 21:21:13 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-04-13 21:21:13 +0000
commit27e644a80bc4534b2521d4b65b6e2ed00236e9ad (patch)
tree1b1dfdcf875c16318c2d61b2fa2d2f7dd55e03ec /sys/mips/atheros
parentd7078f3ba0b8b4b014ace390e99cc700616658c3 (diff)
downloadsrc-27e644a80bc4534b2521d4b65b6e2ed00236e9ad.tar.gz
src-27e644a80bc4534b2521d4b65b6e2ed00236e9ad.zip
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
Notes
Notes: svn path=/head/; revision=249449
Diffstat (limited to 'sys/mips/atheros')
-rw-r--r--sys/mips/atheros/ar71xx_gpio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/mips/atheros/ar71xx_gpio.c b/sys/mips/atheros/ar71xx_gpio.c
index 23386e5b1890..580208eb7e1b 100644
--- a/sys/mips/atheros/ar71xx_gpio.c
+++ b/sys/mips/atheros/ar71xx_gpio.c
@@ -219,8 +219,8 @@ ar71xx_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags)
if (i >= sc->gpio_npins)
return (EINVAL);
- /* Filter out unwanted flags */
- if ((flags &= sc->gpio_pins[i].gp_caps) != flags)
+ /* Check for unwanted flags. */
+ if ((flags & sc->gpio_pins[i].gp_caps) != flags)
return (EINVAL);
/* Can't mix input/output together */