summaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/ti-ads124s08.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/adc/ti-ads124s08.c')
-rw-r--r--drivers/iio/adc/ti-ads124s08.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/ti-ads124s08.c b/drivers/iio/adc/ti-ads124s08.c
index 53f17e4f2f23..552c2be8d87a 100644
--- a/drivers/iio/adc/ti-ads124s08.c
+++ b/drivers/iio/adc/ti-ads124s08.c
@@ -202,7 +202,7 @@ static int ads124s_read(struct iio_dev *indio_dev, unsigned int chan)
};
priv->data[0] = ADS124S08_CMD_RDATA;
- memset(&priv->data[1], ADS124S08_CMD_NOP, sizeof(priv->data));
+ memset(&priv->data[1], ADS124S08_CMD_NOP, sizeof(priv->data) - 1);
ret = spi_sync_transfer(priv->spi, t, ARRAY_SIZE(t));
if (ret < 0)