From: phucduc.bui@gmail.com
To: Brian Norris <computersforpeace@gmail.com>,
Kamal Dasu <kamal.dasu@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH] mtd: rawnand: brcmnand: Propagate errors from optional IRQ lookup
Date: Wed, 12 Aug 2026 17:37:28 +0700 [thread overview]
Message-ID: <20260812103728.39291-1-phucduc.bui@gmail.com> (raw)
From: bui duc phuc <phucduc.bui@gmail.com>
platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure. For an optional IRQ, -ENXIO indicates
that no optional IRQ is available, in which case the driver falls back
to using the ctlrdy IRQ. Other errors should be propagated so that the
caller can handle them appropriately.
Treat -ENXIO as the only case where the driver falls back to the ctlrdy
IRQ, and propagate all other errors returned by
platform_get_irq_optional().
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index 5b9dadd5405e..4a1f5e736a1c 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -3272,6 +3272,8 @@ static int brcmnand_edu_setup(struct platform_device *pdev)
ctrl->edu_irq = platform_get_irq_optional(pdev, 1);
if (ctrl->edu_irq < 0) {
+ if (ctrl->edu_irq != -ENXIO)
+ return ctrl->edu_irq;
dev_warn(dev,
"FLASH EDU enabled, using ctlrdy irq\n");
} else {
--
2.43.0
reply other threads:[~2026-08-12 10:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260812103728.39291-1-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=computersforpeace@gmail.com \
--cc=kamal.dasu@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.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