Thus wrote Nigel Christian ([email protected]):

> There is no need to call the dev_err() function directly to print
> a custom message when handling an error from platform_get_irq()
> as it prints the appropriate message in the event of a failure.
> Change suggested via coccicheck report.

> Signed-off-by: Nigel Christian <[email protected]>
> ---
>  drivers/char/hw_random/imx-rngc.c | 1 -
>  1 file changed, 1 deletion(-)

> diff --git a/drivers/char/hw_random/imx-rngc.c 
> b/drivers/char/hw_random/imx-rngc.c
> index 61c844baf26e..69f13ff1bbec 100644
> --- a/drivers/char/hw_random/imx-rngc.c
> +++ b/drivers/char/hw_random/imx-rngc.c
> @@ -253,7 +253,6 @@ static int imx_rngc_probe(struct platform_device *pdev)

>       irq = platform_get_irq(pdev, 0);
>       if (irq <= 0) {
> -             dev_err(&pdev->dev, "Couldn't get irq %d\n", irq);
>               return irq;
>       }

Looks good to me. This suppresses the error message if platform_get_irq
returns -EPROBE_DEFER, which makes more sense than the current code.

Reviewed-by: Martin Kaiser <[email protected]>

Reply via email to