mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: phucduc.bui@gmail.com
To: Khuong Dinh <khuong@os.amperecomputing.com>,
	Borislav Petkov <bp@alien8.de>, Tony Luck <tony.luck@intel.com>,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH] EDAC/xgene: Use platform_get_irq() for IRQ lookup
Date: Fri, 14 Aug 2026 11:53:47 +0700	[thread overview]
Message-ID: <20260814045347.13841-1-phucduc.bui@gmail.com> (raw)

From: bui duc phuc <phucduc.bui@gmail.com>

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 <phucduc.bui@gmail.com>
---
 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


             reply	other threads:[~2026-08-14  4:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14  4:53 phucduc.bui [this message]
2026-08-14 18:15 ` Borislav Petkov
2026-08-15  3:30   ` Bui Duc Phuc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260814045347.13841-1-phucduc.bui@gmail.com \
    --to=phucduc.bui@gmail.com \
    --cc=bp@alien8.de \
    --cc=khuong@os.amperecomputing.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®