Re: [PATCH 02/13] iio:bma180: Missing check for frequency fractional part

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/07/14 19:32, Peter Meerwald wrote:
val2 should be zero

Signed-off-by: Peter Meerwald <pmeerw@xxxxxxxxxx>
Cc: Oleksandr Kravchenko <o.v.kravchenko@xxxxxxxxxxxxxxx>
Applied to the fixes-togreg branch of iio.git and marked for stable.
I added a bit more explanation to the the description of what the actual
result was.

---
  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 28388bb..a077cc8 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);


--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux