diff options
author | Ricardo Ribalda <ribalda@chromium.org> | 2024-04-29 17:04:45 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2024-05-03 12:07:05 +0200 |
commit | a545fd3249d9f9e1bafc8a0c9f7f9745c1de28ca (patch) | |
tree | 1ce8324baf04fd6ce69f4dddd7e521b62c7422cf /drivers/media | |
parent | media: go7007: Use min and max macros (diff) | |
download | linux-a545fd3249d9f9e1bafc8a0c9f7f9745c1de28ca.tar.xz linux-a545fd3249d9f9e1bafc8a0c9f7f9745c1de28ca.zip |
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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c index bce821eb71ce..4acc3b90d03a 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c +++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c @@ -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)) { |