Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: ade9000: fix wrong return type in streaming push

The else branch of ade9000_iio_push_streaming() incorrectly returns
IRQ_HANDLED on regmap_write failure. This function returns int (0 on
success, negative errno on failure), so IRQ_HANDLED (1) would be
misinterpreted as a non-error by callers.

Return ret instead, consistent with every other error path in the
function.

Fixes: 81de7b4619fc ("iio: adc: add ade9000 support")
Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Reviewed-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Giorgi Tchankvetadze and committed by
Jonathan Cameron
57b207e3 86133fb1

+1 -1
+1 -1
drivers/iio/adc/ade9000.c
··· 787 787 ADE9000_MIDDLE_PAGE_BIT); 788 788 if (ret) { 789 789 dev_err_ratelimited(dev, "IRQ0 WFB write fail"); 790 - return IRQ_HANDLED; 790 + return ret; 791 791 } 792 792 793 793 ade9000_configure_scan(indio_dev, ADE9000_REG_WF_BUFF);