On Mon, 2020-05-18 at 22:57 +0530, Tamseel Shams wrote:
> platform_get_irq() will call dev_err() itself on failure,
> so there is no need for the driver to also do this.
> This is detected by coccinelle.

trivia:

> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c 
> b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
[]
> @@ -1810,7 +1810,6 @@ static int exynos_dsi_probe(struct platform_device 
> *pdev)
>  
>       dsi->irq = platform_get_irq(pdev, 0);
>       if (dsi->irq < 0) {
> -             dev_err(dev, "failed to request dsi irq resource\n");
>               return dsi->irq;
>       }

You could also remove the now atypical braces

        if (dsi->irq < 0)
                return dsi->irq;

> diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c 
> b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
[]
> @@ -294,7 +294,6 @@ static int rotator_probe(struct platform_device *pdev)
>  
>       irq = platform_get_irq(pdev, 0);
>       if (irq < 0) {
> -             dev_err(dev, "failed to get irq\n");
>               return irq;
>       }

etc...


Reply via email to