Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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/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>

authored by

Ricardo Ribalda and committed by
Mauro Carvalho Chehab
a545fd32 707928b9

+2 -5
+2 -5
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c
··· 439 439 "Could not get reset control\n"); 440 440 441 441 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; 447 444 448 445 dcmipp->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); 449 446 if (IS_ERR(dcmipp->regs)) {