diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2013-04-13 21:21:13 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2013-04-13 21:21:13 +0000 |
commit | 27e644a80bc4534b2521d4b65b6e2ed00236e9ad (patch) | |
tree | 1b1dfdcf875c16318c2d61b2fa2d2f7dd55e03ec /sys/mips/rt305x | |
parent | d7078f3ba0b8b4b014ace390e99cc700616658c3 (diff) | |
download | src-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/rt305x')
-rw-r--r-- | sys/mips/rt305x/rt305x_gpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/mips/rt305x/rt305x_gpio.c b/sys/mips/rt305x/rt305x_gpio.c index a911b3329175..1d685187ec17 100644 --- a/sys/mips/rt305x/rt305x_gpio.c +++ b/sys/mips/rt305x/rt305x_gpio.c @@ -242,8 +242,8 @@ rt305x_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 */ |