[3.13.y.z extended stable] Patch "iio:bma180: Missing check for frequency fractional part" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Thu Aug 7 21:55:39 UTC 2014
This is a note to let you know that I have just added a patch titled
iio:bma180: Missing check for frequency fractional part
to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue
This patch is scheduled to be released in version 3.13.11.6.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.13.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 28b322af34878e353d5b9adc64cd6954ca0f3d1b Mon Sep 17 00:00:00 2001
From: Peter Meerwald <pmeerw at pmeerw.net>
Date: Wed, 16 Jul 2014 19:32:00 +0100
Subject: iio:bma180: Missing check for frequency fractional part
commit 9b2a4d35a6ceaf217be61ed8eb3c16986244f640 upstream.
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 <pmeerw at pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko at globallogic.com>
Signed-off-by: Jonathan Cameron <jic23 at kernel.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/iio/accel/bma180.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
index 8d5ea9b..93ff0ba 100644
--- 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);
--
1.9.1
More information about the kernel-team
mailing list