Commit 4e89780a authored by Deepak R Varma's avatar Deepak R Varma Committed by Borislav Petkov (AMD)

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: default avatarDeepak R Varma <drv@mailo.com>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/Y/+j27kqdhflPtaj@ubun2204.myguest.virtualbox.org
parent e8d018dd
...@@ -2149,10 +2149,8 @@ static int altr_edac_a10_probe(struct platform_device *pdev) ...@@ -2149,10 +2149,8 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
} }
edac->sb_irq = platform_get_irq(pdev, 0); edac->sb_irq = platform_get_irq(pdev, 0);
if (edac->sb_irq < 0) { if (edac->sb_irq < 0)
dev_err(&pdev->dev, "No SBERR IRQ resource\n");
return edac->sb_irq; return edac->sb_irq;
}
irq_set_chained_handler_and_data(edac->sb_irq, irq_set_chained_handler_and_data(edac->sb_irq,
altr_edac_a10_irq_handler, altr_edac_a10_irq_handler,
...@@ -2184,10 +2182,9 @@ static int altr_edac_a10_probe(struct platform_device *pdev) ...@@ -2184,10 +2182,9 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
} }
#else #else
edac->db_irq = platform_get_irq(pdev, 1); edac->db_irq = platform_get_irq(pdev, 1);
if (edac->db_irq < 0) { if (edac->db_irq < 0)
dev_err(&pdev->dev, "No DBERR IRQ resource\n");
return edac->db_irq; return edac->db_irq;
}
irq_set_chained_handler_and_data(edac->db_irq, irq_set_chained_handler_and_data(edac->db_irq,
altr_edac_a10_irq_handler, edac); altr_edac_a10_irq_handler, edac);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment