Skip to content

Commit a545fd3

Browse files
ribaldamchehab
authored andcommitted
media: stm32-dcmipp: Remove redundant printk
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/[email protected] Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 707928b commit a545fd3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,8 @@ static int dcmipp_probe(struct platform_device *pdev)
439439
"Could not get reset control\n");
440440

441441
irq = platform_get_irq(pdev, 0);
442-
if (irq <= 0) {
443-
if (irq != -EPROBE_DEFER)
444-
dev_err(&pdev->dev, "Could not get irq\n");
445-
return irq ? irq : -ENXIO;
446-
}
442+
if (irq < 0)
443+
return irq;
447444

448445
dcmipp->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
449446
if (IS_ERR(dcmipp->regs)) {

0 commit comments

Comments
 (0)