media: stm32-dcmipp: Remove redundant printk
authorRicardo Ribalda <ribalda@chromium.org>
Mon, 29 Apr 2024 15:04:45 +0000 (16:04 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 3 May 2024 10:07:05 +0000 (11:07 +0100)
platform_get_irq() already prints an error message.

Also platform_get_irq() can never return 0, so lets fix the condition
now that we are at it.

Found by cocci:
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c:444:3-10: line 444 is redundant because platform_get_irq() already prints an error

Link: https://lore.kernel.org/linux-media/20240429-fix-cocci-v3-6-3c4865f5a4b0@chromium.org
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c

index bce821eb71cec59041827616106a93abea92f94b..4acc3b90d03aa5d096a550b7997894cd5fb88ff0 100644 (file)
@@ -439,11 +439,8 @@ static int dcmipp_probe(struct platform_device *pdev)
                                     "Could not get reset control\n");
 
        irq = platform_get_irq(pdev, 0);
-       if (irq <= 0) {
-               if (irq != -EPROBE_DEFER)
-                       dev_err(&pdev->dev, "Could not get irq\n");
-               return irq ? irq : -ENXIO;
-       }
+       if (irq < 0)
+               return irq;
 
        dcmipp->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
        if (IS_ERR(dcmipp->regs)) {