summaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel/kxsd9.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/accel/kxsd9.c')
-rw-r--r--drivers/iio/accel/kxsd9.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c
index da5fb67ecb34..9d72d4bcf5e9 100644
--- a/drivers/iio/accel/kxsd9.c
+++ b/drivers/iio/accel/kxsd9.c
@@ -166,6 +166,7 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev,
ret = spi_w8r8(st->us, KXSD9_READ(KXSD9_REG_CTRL_C));
if (ret < 0)
goto error_ret;
+ *val = 0;
*val2 = kxsd9_micro_scales[ret & KXSD9_FS_MASK];
ret = IIO_VAL_INT_PLUS_MICRO;
break;