diff mbox series

[-next] media: rcar_jpu: Remove redundant dev_err()

Message ID 20230727101128.2752153-1-ruanjinjie@huawei.com (mailing list archive)
State Mainlined
Commit c84db0f2302966cf6396e4258c547884cb11e381
Delegated to: Kieran Bingham
Headers show
Series [-next] media: rcar_jpu: Remove redundant dev_err() | expand

Commit Message

Jinjie Ruan July 27, 2023, 10:11 a.m. UTC
There is no need to call the dev_err() function directly to print a custom
message when handling an error from platform_get_irq() function as
it is going to display an appropriate error message in case of a failure.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
 drivers/media/platform/renesas/rcar_jpu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Geert Uytterhoeven July 27, 2023, 7:33 a.m. UTC | #1
On Thu, Jul 27, 2023 at 4:37 AM Ruan Jinjie <ruanjinjie@huawei.com> wrote:
> There is no need to call the dev_err() function directly to print a custom
> message when handling an error from platform_get_irq() function as
> it is going to display an appropriate error message in case of a failure.
>
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/drivers/media/platform/renesas/rcar_jpu.c b/drivers/media/platform/renesas/rcar_jpu.c
index 2b8cb50f54de..2c01bf14ccb4 100644
--- a/drivers/media/platform/renesas/rcar_jpu.c
+++ b/drivers/media/platform/renesas/rcar_jpu.c
@@ -1601,10 +1601,8 @@  static int jpu_probe(struct platform_device *pdev)
 
 	/* interrupt service routine registration */
 	jpu->irq = ret = platform_get_irq(pdev, 0);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "cannot find IRQ\n");
+	if (ret < 0)
 		return ret;
-	}
 
 	ret = devm_request_irq(&pdev->dev, jpu->irq, jpu_irq_handler, 0,
 			       dev_name(&pdev->dev), jpu);