aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/proximity/as3935.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2017-06-01 13:47:20 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-06-01 13:47:20 +1000
commit73b955582ea5bcdb470d996685cd7f1abd3ce7f5 (patch)
treedd2e408f5c2bd14551671cc902a8cdb892544ea3 /drivers/iio/proximity/as3935.c
parent4ccbb5fb61794d14cca24cb8dcc68db025f7659a (diff)
parentca9280d1f82a7a0165a683dc09f182329ebec352 (diff)
Merge remote-tracking branch 'staging/staging-next'
Diffstat (limited to 'drivers/iio/proximity/as3935.c')
-rw-r--r--drivers/iio/proximity/as3935.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/proximity/as3935.c b/drivers/iio/proximity/as3935.c
index aa4df0dcc8c9..0eeff29b61be 100644
--- a/drivers/iio/proximity/as3935.c
+++ b/drivers/iio/proximity/as3935.c
@@ -176,13 +176,13 @@ static int as3935_read_raw(struct iio_dev *indio_dev,
if (ret)
return ret;
- if (m == IIO_CHAN_INFO_RAW)
- return IIO_VAL_INT;
-
/* storm out of range */
if (*val == AS3935_DATA_MASK)
return -EINVAL;
+ if (m == IIO_CHAN_INFO_RAW)
+ return IIO_VAL_INT;
+
if (m == IIO_CHAN_INFO_PROCESSED)
*val *= 1000;
break;