diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-07-04 18:19:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-07-04 18:19:21 +0300 |
commit | c318a821b9828ef3be97d5d896d146e7daa43c86 (patch) | |
tree | 7ed40911ffebcbabf87ec4be692f6fb154053687 /drivers/iio/accel/kxsd9.c | |
parent | 322832f2f19e04c866a0ce4bdac8cff8e695f2b3 (diff) | |
parent | a99cde438de0c4c0cecc1d1af1a55a75b10bfdef (diff) | |
download | linux-c318a821b9828ef3be97d5d896d146e7daa43c86.tar.xz |
Merge 4.7-rc6 into usb-next
We want the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/accel/kxsd9.c')
-rw-r--r-- | drivers/iio/accel/kxsd9.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c index 923f56598d4b..3a9f106787d2 100644 --- a/drivers/iio/accel/kxsd9.c +++ b/drivers/iio/accel/kxsd9.c @@ -81,7 +81,7 @@ static int kxsd9_write_scale(struct iio_dev *indio_dev, int micro) mutex_lock(&st->buf_lock); ret = spi_w8r8(st->us, KXSD9_READ(KXSD9_REG_CTRL_C)); - if (ret) + if (ret < 0) goto error_ret; st->tx[0] = KXSD9_WRITE(KXSD9_REG_CTRL_C); st->tx[1] = (ret & ~KXSD9_FS_MASK) | i; @@ -163,7 +163,7 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev, break; case IIO_CHAN_INFO_SCALE: ret = spi_w8r8(st->us, KXSD9_READ(KXSD9_REG_CTRL_C)); - if (ret) + if (ret < 0) goto error_ret; *val2 = kxsd9_micro_scales[ret & KXSD9_FS_MASK]; ret = IIO_VAL_INT_PLUS_MICRO; |