[PATCH -next] iio: adc: Remove redundant dev_err_probe()

Heiko Stuebner heiko at sntech.de
Fri Jul 28 11:23:04 PDT 2023


Am Donnerstag, 27. Juli 2023, 09:39:12 CEST schrieb Ruan Jinjie:
> There is no need to call the dev_err() function directly to print a custom
> message when handling an error from either the platform_get_irq() or
> platform_get_irq_byname() functions as both are going to display an
> appropriate error message in case of a failure.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie at huawei.com>
> ---

>  drivers/iio/adc/rockchip_saradc.c | 2 +-

For Rockchip:
Acked-by: Heiko Stuebner <heiko at sntech.de>

> diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c
> index 4b011f7eddec..8270652244c2 100644
> --- a/drivers/iio/adc/rockchip_saradc.c
> +++ b/drivers/iio/adc/rockchip_saradc.c
> @@ -467,7 +467,7 @@ static int rockchip_saradc_probe(struct platform_device *pdev)
>  
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0)
> -		return dev_err_probe(&pdev->dev, irq, "failed to get irq\n");
> +		return irq;
>  
>  	ret = devm_request_irq(&pdev->dev, irq, rockchip_saradc_isr,
>  			       0, dev_name(&pdev->dev), info);







More information about the linux-arm-kernel mailing list