[PATCH] iio: adc: fix return error variable
Michal Simek
michal.simek at xilinx.com
Mon May 9 00:34:57 PDT 2022
On 5/9/22 09:24, cgel.zte at gmail.com wrote:
> From: Lv Ruyi <lv.ruyi at zte.com.cn>
>
> Return irq instead of ret which always equals to zero here.
>
> Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver")
> Reported-by: Zeal Robot <zealci at zte.com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi at zte.com.cn>
> ---
> drivers/iio/adc/xilinx-ams.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c
> index a55396c1f8b2..a7687706012d 100644
> --- a/drivers/iio/adc/xilinx-ams.c
> +++ b/drivers/iio/adc/xilinx-ams.c
> @@ -1409,7 +1409,7 @@ static int ams_probe(struct platform_device *pdev)
>
> irq = platform_get_irq(pdev, 0);
> if (irq < 0)
> - return ret;
> + return irq;
>
> ret = devm_request_irq(&pdev->dev, irq, &ams_irq, 0, "ams-irq",
> indio_dev);
Reviewed-by: Michal Simek <michal.simek at amd.com>
Thanks,
Michal
More information about the linux-arm-kernel
mailing list