Skip to content

Commit 4e89780

Browse files
hidrv4bp3tk0v
authored andcommitted
EDAC/altera: Remove redundant error logging
A call to platform_get_irq() already prints an error on failure within its own implementation. So printing another error based on its return value in the caller is redundant and should be removed. The clean up also makes if condition block braces unnecessary. Remove that as well. Issue identified using platform_get_irq.cocci coccinelle semantic patch. Signed-off-by: Deepak R Varma <drv@mailo.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/Y/+j27kqdhflPtaj@ubun2204.myguest.virtualbox.org
1 parent e8d018d commit 4e89780

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

drivers/edac/altera_edac.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,10 +2149,8 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
21492149
}
21502150

21512151
edac->sb_irq = platform_get_irq(pdev, 0);
2152-
if (edac->sb_irq < 0) {
2153-
dev_err(&pdev->dev, "No SBERR IRQ resource\n");
2152+
if (edac->sb_irq < 0)
21542153
return edac->sb_irq;
2155-
}
21562154

21572155
irq_set_chained_handler_and_data(edac->sb_irq,
21582156
altr_edac_a10_irq_handler,
@@ -2184,10 +2182,9 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
21842182
}
21852183
#else
21862184
edac->db_irq = platform_get_irq(pdev, 1);
2187-
if (edac->db_irq < 0) {
2188-
dev_err(&pdev->dev, "No DBERR IRQ resource\n");
2185+
if (edac->db_irq < 0)
21892186
return edac->db_irq;
2190-
}
2187+
21912188
irq_set_chained_handler_and_data(edac->db_irq,
21922189
altr_edac_a10_irq_handler, edac);
21932190
#endif

0 commit comments

Comments
 (0)