* [PATCH] mtd: rawnand: brcmnand: Propagate errors from optional IRQ lookup
@ 2026-08-12 10:37 phucduc.bui
2026-09-04 18:08 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: phucduc.bui @ 2026-08-12 10:37 UTC (permalink / raw)
To: Brian Norris, Kamal Dasu, Broadcom internal kernel review list,
Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
linux-mtd
Cc: linux-kernel, bui duc phuc
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: rawnand: brcmnand: Propagate errors from optional IRQ lookup
2026-08-12 10:37 [PATCH] mtd: rawnand: brcmnand: Propagate errors from optional IRQ lookup phucduc.bui
@ 2026-09-04 18:08 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2026-09-04 18:08 UTC (permalink / raw)
To: Brian Norris, Kamal Dasu, Broadcom internal kernel review list,
Richard Weinberger, Vignesh Raghavendra, linux-mtd, phucduc.bui
Cc: linux-kernel
On Wed, 12 Aug 2026 17:37:28 +0700, phucduc.bui@gmail.com wrote:
> 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().
>
> [...]
Applied to nand/next, thanks!
[1/1] mtd: rawnand: brcmnand: Propagate errors from optional IRQ lookup
commit: c9e20e213bb051d02711155de0dc4759de2faddf
Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).
Kind regards,
Miquèl
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-04 18:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-12 10:37 [PATCH] mtd: rawnand: brcmnand: Propagate errors from optional IRQ lookup phucduc.bui
2026-09-04 18:08 ` Miquel Raynal
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®