[PATCH] EDAC/xgene: Use platform_get_irq() for IRQ lookup

[email protected]
Newsgroups org.kernel.vger.linux-edac,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
From: bui duc phuc <[email protected]>

The probe function propagates any negative return value from
platform_get_irq_optional() and aborts the probe. Therefore, the
optional IRQ semantics of platform_get_irq_optional() are not used
here.

Use platform_get_irq() instead, which matches the existing error
handling by propagating any IRQ lookup error.

platform_get_irq() also reports lookup errors itself, so remove the
redundant error message from the driver.

Signed-off-by: bui duc phuc <[email protected]>
---
 drivers/edac/xgene_edac.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
index 9955396c9a52..aae7e03b0573 100644
--- a/drivers/edac/xgene_edac.c
+++ b/drivers/edac/xgene_edac.c
@@ -1915,9 +1915,8 @@ static int xgene_edac_probe(struct platform_device *pdev)
 		int i;
 
 		for (i = 0; i < 3; i++) {
-			irq = platform_get_irq_optional(pdev, i);
+			irq = platform_get_irq(pdev, i);
 			if (irq < 0) {
-				dev_err(&pdev->dev, "No IRQ resource\n");
 				rc = irq;
 				goto out_err;
 			}
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.