linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: mtk-jpeg: Remove unnecessary print function dev_err()
@ 2021-11-16  1:47 Xu Wang
  2021-11-17 14:40 ` Kieran Bingham
  0 siblings, 1 reply; 2+ messages in thread
From: Xu Wang @ 2021-11-16  1:47 UTC (permalink / raw)
  To: rick.chang, bin.liu, mchehab, matthias.bgg
  Cc: linux-media, linux-mediatek, linux-kernel

The print function dev_err() is redundant because
platform_get_irq() already prints an error.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
index af994b9913a6..f332beb06d51 100644
--- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
+++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
@@ -1361,10 +1361,8 @@ static int mtk_jpeg_probe(struct platform_device *pdev)
 	}
 
 	jpeg_irq = platform_get_irq(pdev, 0);
-	if (jpeg_irq < 0) {
-		dev_err(&pdev->dev, "Failed to get jpeg_irq %d.\n", jpeg_irq);
+	if (jpeg_irq < 0)
 		return jpeg_irq;
-	}
 
 	ret = devm_request_irq(&pdev->dev, jpeg_irq,
 			       jpeg->variant->irq_handler, 0, pdev->name, jpeg);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: mtk-jpeg: Remove unnecessary print function dev_err()
  2021-11-16  1:47 [PATCH] media: mtk-jpeg: Remove unnecessary print function dev_err() Xu Wang
@ 2021-11-17 14:40 ` Kieran Bingham
  0 siblings, 0 replies; 2+ messages in thread
From: Kieran Bingham @ 2021-11-17 14:40 UTC (permalink / raw)
  To: Xu Wang, bin.liu, matthias.bgg, mchehab, rick.chang
  Cc: linux-media, linux-mediatek, linux-kernel

Quoting Xu Wang (2021-11-16 01:47:26)
> The print function dev_err() is redundant because
> platform_get_irq() already prints an error.

This one was also reporting errors in the case of -EPROBE_DEFER, which
will now go away, so this looks like a valid change to me.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
>  drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
> index af994b9913a6..f332beb06d51 100644
> --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
> +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
> @@ -1361,10 +1361,8 @@ static int mtk_jpeg_probe(struct platform_device *pdev)
>         }
>  
>         jpeg_irq = platform_get_irq(pdev, 0);
> -       if (jpeg_irq < 0) {
> -               dev_err(&pdev->dev, "Failed to get jpeg_irq %d.\n", jpeg_irq);
> +       if (jpeg_irq < 0)
>                 return jpeg_irq;
> -       }
>  
>         ret = devm_request_irq(&pdev->dev, jpeg_irq,
>                                jpeg->variant->irq_handler, 0, pdev->name, jpeg);
> -- 
> 2.25.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-17 14:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16  1:47 [PATCH] media: mtk-jpeg: Remove unnecessary print function dev_err() Xu Wang
2021-11-17 14:40 ` Kieran Bingham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).