RE: [PATCH] iio: adc: ade9000: fix wrong return type in streaming push
From: Miclaus, Antoniu
Date: Tue Feb 24 2026 - 08:10:29 EST
> -----Original Message-----
> From: Giorgi Tchankvetadze <giorgitchankvetadze1997@xxxxxxxxx>
> Sent: Tuesday, February 24, 2026 2:59 PM
> To: Miclaus, Antoniu <Antoniu.Miclaus@xxxxxxxxxx>; lars@xxxxxxxxxx;
> Hennerich, Michael <Michael.Hennerich@xxxxxxxxxx>; jic23@xxxxxxxxxx
> Cc: David Lechner <dlechner@xxxxxxxxxxxx>; Sa, Nuno
> <Nuno.Sa@xxxxxxxxxx>; andy@xxxxxxxxxx; linux-iio@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; Giorgi Tchankvetadze
> <giorgitchankvetadze1997@xxxxxxxxx>
> Subject: [PATCH] iio: adc: ade9000: fix wrong return type in streaming push
>
> [External]
>
> 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. Also add the missing newline in the error message.
>
> Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@xxxxxxxxx>
> ---
Hi,
> drivers/iio/adc/ade9000.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/adc/ade9000.c b/drivers/iio/adc/ade9000.c
> index 5dcc26a08970..07e84c6257d4 100644
> --- a/drivers/iio/adc/ade9000.c
> +++ b/drivers/iio/adc/ade9000.c
> @@ -786,8 +786,8 @@ static int ade9000_iio_push_streaming(struct iio_dev
> *indio_dev)
> ret = regmap_write(st->regmap,
> ADE9000_REG_WFB_PG_IRQEN,
> ADE9000_MIDDLE_PAGE_BIT);
> if (ret) {
> - dev_err_ratelimited(dev, "IRQ0 WFB write fail");
> - return IRQ_HANDLED;
> + dev_err_ratelimited(dev, "IRQ0 WFB write fail\n");
The `\n` is unrelated to the scope of this patch. Also, you are missing a Fixes: tag.
Otherwise, the fix looks good.
> + return ret;
> }
>
> ade9000_configure_scan(indio_dev,
> ADE9000_REG_WF_BUFF);
> --
> 2.52.0