]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: adc: ade9000: fix wrong return type in streaming push
authorGiorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Tue, 24 Feb 2026 13:23:55 +0000 (17:23 +0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 1 Mar 2026 11:20:10 +0000 (11:20 +0000)
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>
drivers/iio/adc/ade9000.c

index 945a159e5de66ba2338b2cd3743827d973918165..1abbfdfcd554c8f18fbe611d6f7e407269195cd8 100644 (file)
@@ -787,7 +787,7 @@ static int ade9000_iio_push_streaming(struct iio_dev *indio_dev)
                                   ADE9000_MIDDLE_PAGE_BIT);
                if (ret) {
                        dev_err_ratelimited(dev, "IRQ0 WFB write fail");
-                       return IRQ_HANDLED;
+                       return ret;
                }
 
                ade9000_configure_scan(indio_dev, ADE9000_REG_WF_BUFF);