[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cbc2c587a04324f807a9c3d8d221f289@agner.ch>
Date: Tue, 20 Dec 2022 08:32:00 +0100
From: Stefan Agner <stefan@...er.ch>
To: Deepak R Varma <drv@...lo.com>
Cc: Alison Wang <alison.wang@....com>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Saurabh Singh Sengar <ssengar@...rosoft.com>,
Praveen Kumar <kumarpraveen@...ux.microsoft.com>
Subject: Re: [PATCH] drm/fsl-dcu: Remove redundant error logging
On 2022-12-11 11:27, Deepak R Varma wrote:
> A call to platform_get_irq() already prints an error on failure within
> its own implementation. So printing another error based on its return
> value in the caller is redundant and should be removed. The clean up
> also makes if condition block braces unnecessary. Remove that as well.
>
> Issue identified using platform_get_irq.cocci coccicheck script.
>
> Signed-off-by: Deepak R Varma <drv@...lo.com>
Reviewed-by: Stefan Agner <stefan@...er.ch>
--
Stefan
> ---
> drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
> b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
> index 8579c7629f5e..1ba7d95e1956 100644
> --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
> +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
> @@ -272,10 +272,8 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)
> }
>
> fsl_dev->irq = platform_get_irq(pdev, 0);
> - if (fsl_dev->irq < 0) {
> - dev_err(dev, "failed to get irq\n");
> + if (fsl_dev->irq < 0)
> return fsl_dev->irq;
> - }
>
> fsl_dev->regmap = devm_regmap_init_mmio(dev, base,
> &fsl_dcu_regmap_config);
> --
> 2.34.1
Powered by blists - more mailing lists