The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] ipmi: si: Handle errors from optional IRQ lookup
@ 2026-08-17 10:51 phucduc.bui
  2026-08-17 11:30 ` Corey Minyard
  0 siblings, 1 reply; 2+ messages in thread
From: phucduc.bui @ 2026-08-17 10:51 UTC (permalink / raw)
  To: Corey Minyard, Rosen Penev, openipmi-developer, linux-kernel; +Cc: 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. Other errors, such as -EPROBE_DEFER
and -EINVAL, should be propagated so that the caller can handle them
appropriately.

Propagate negative errors other than -ENXIO.

Fixes: 39851b7e580a ("ipmi: si: Use platform_get_irq_optional() to retrieve interrupt")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 drivers/char/ipmi/ipmi_si_platform.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/char/ipmi/ipmi_si_platform.c b/drivers/char/ipmi/ipmi_si_platform.c
index bdc481ce1302..04b3e205470f 100644
--- a/drivers/char/ipmi/ipmi_si_platform.c
+++ b/drivers/char/ipmi/ipmi_si_platform.c
@@ -198,6 +198,8 @@ static int platform_ipmi_probe(struct platform_device *pdev)
 		io.slave_addr = slave_addr;
 
 	io.irq = platform_get_irq_optional(pdev, 0);
+	if (io.irq < 0 && io.irq != -ENXIO)
+		return io.irq;
 	if (io.irq > 0)
 		io.irq_setup = ipmi_std_irq_setup;
 	else
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-17 11:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-17 10:51 [PATCH] ipmi: si: Handle errors from optional IRQ lookup phucduc.bui
2026-08-17 11:30 ` Corey Minyard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox