projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
381676d
)
iio:bma180: Missing check for frequency fractional part
author
Peter Meerwald
<
[email protected]
>
Wed, 16 Jul 2014 18:32:00 +0000
(19:32 +0100)
committer
Jonathan Cameron
<
[email protected]
>
Sun, 20 Jul 2014 16:39:47 +0000
(17:39 +0100)
val2 should be zero
This will make no difference for correct inputs but will reject
incorrect ones with a decimal part in the value written to the sysfs
interface.
Signed-off-by: Peter Meerwald <
[email protected]
>
Cc: Oleksandr Kravchenko <
[email protected]
>
Signed-off-by: Jonathan Cameron <
[email protected]
>
Cc:
[email protected]
drivers/iio/accel/bma180.c
patch
|
blob
|
history
diff --git
a/drivers/iio/accel/bma180.c
b/drivers/iio/accel/bma180.c
index 28388bb5d583443be9c9680baad4045c1738fd74..a077cc86421b5eb24519ab25a61ebb41105af5e8 100644
(file)
--- a/
drivers/iio/accel/bma180.c
+++ b/
drivers/iio/accel/bma180.c
@@
-376,6
+376,8
@@
static int bma180_write_raw(struct iio_dev *indio_dev,
mutex_unlock(&data->mutex);
return ret;
case IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY:
+ if (val2)
+ return -EINVAL;
mutex_lock(&data->mutex);
ret = bma180_set_bw(data, val);
mutex_unlock(&data->mutex);