summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHernán Gonzalez <hernan@vanguardiasur.com.ar>2018-04-13 19:36:40 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-04-21 17:38:38 +0300
commit2c973421648bc542c93aa9417a0de1e92f677248 (patch)
tree569be78d183257d549312281071deda303ef9a54 /drivers
parentda2d54494c56339dc8ebd9093d332b23933dc2a3 (diff)
downloadlinux-2c973421648bc542c93aa9417a0de1e92f677248.tar.xz
staging: iio: ad7746: Fix bound checkings
Also remove unnecessary parenthesis Signed-off-by: Hernán Gonzalez <hernan@vanguardiasur.com.ar> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/iio/cdc/ad7746.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
index 5dad5d3c3efe..f53612a6461d 100644
--- a/drivers/staging/iio/cdc/ad7746.c
+++ b/drivers/staging/iio/cdc/ad7746.c
@@ -457,7 +457,7 @@ static int ad7746_write_raw(struct iio_dev *indio_dev,
ret = 0;
break;
case IIO_CHAN_INFO_CALIBBIAS:
- if ((val < 0) | (val > 0xFFFF)) {
+ if (val < 0 || val > 0xFFFF) {
ret = -EINVAL;
goto out;
}
@@ -469,7 +469,7 @@ static int ad7746_write_raw(struct iio_dev *indio_dev,
ret = 0;
break;
case IIO_CHAN_INFO_OFFSET:
- if ((val < 0) | (val > 43008000)) { /* 21pF */
+ if (val < 0 || val > 43008000) { /* 21pF */
ret = -EINVAL;
goto out;
}