summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2022-02-24 22:10:34 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-02-26 19:07:10 +0100
commit185897d03ca3c4c98eff5cbf151671c5f88165fb (patch)
treee679972c55776492ebef1735c64054ef5d1067da /drivers/iio
parentiio: accel: adxl367: unlock on error in adxl367_buffer_predisable() (diff)
downloadlinux-185897d03ca3c4c98eff5cbf151671c5f88165fb.tar.xz
linux-185897d03ca3c4c98eff5cbf151671c5f88165fb.zip
iio: accel: adxl367: Fix handled initialization in adxl367_irq_handler()
Clang warns: drivers/iio/accel/adxl367.c:887:2: error: variable 'handled' is uninitialized when used here [-Werror,-Wuninitialized] handled |= adxl367_push_event(indio_dev, status); ^~~~~~~ drivers/iio/accel/adxl367.c:879:14: note: initialize the variable 'handled' to silence this warning bool handled; ^ = 0 1 error generated. This should have used '=' instead of '|='; make that change to resolve the warning. Fixes: cbab791c5e2a ("iio: accel: add ADXL367 driver") Link: https://github.com/ClangBuiltLinux/linux/issues/1605 Reported-by: kernel test robot <lkp@intel.com> Reported-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20220224211034.625130-1-nathan@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/accel/adxl367.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/accel/adxl367.c b/drivers/iio/accel/adxl367.c
index bdc95409abed..62960134ea19 100644
--- a/drivers/iio/accel/adxl367.c
+++ b/drivers/iio/accel/adxl367.c
@@ -884,7 +884,7 @@ static irqreturn_t adxl367_irq_handler(int irq, void *private)
if (ret)
return IRQ_NONE;
- handled |= adxl367_push_event(indio_dev, status);
+ handled = adxl367_push_event(indio_dev, status);
handled |= adxl367_push_fifo_data(indio_dev, status, fifo_entries);
return handled ? IRQ_HANDLED : IRQ_NONE;