From: Corey Minyard <corey@minyard.net>
To: phucduc.bui@gmail.com
Cc: openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] ipmi: bt-bmc: Handle -ENXIO from optional IRQ lookup
Date: Mon, 17 Aug 2026 06:40:12 -0500 [thread overview]
Message-ID: <aoLzHBRmgwBGem7p@mail.minyard.net> (raw)
In-Reply-To: <20260817105041.63224-2-phucduc.bui@gmail.com>
On Mon, Aug 17, 2026 at 05:50:39PM +0700, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> platform_get_irq_optional() can return -ENXIO when no IRQ resource is
> available, as well as other negative error codes.
>
> The probe path supports running without an IRQ by falling back to
> the timer. Treat -ENXIO as the no-IRQ case while propagating other
> errors to the caller.
This is obviously wrong, it will pass -ENXIO into devm_request_irq()
if returned.
-corey
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
> drivers/char/ipmi/bt-bmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
> index 7d3944bda8db..4c5457c88503 100644
> --- a/drivers/char/ipmi/bt-bmc.c
> +++ b/drivers/char/ipmi/bt-bmc.c
> @@ -380,7 +380,7 @@ static int bt_bmc_config_irq(struct bt_bmc *bt_bmc,
> u32 reg;
>
> bt_bmc->irq = platform_get_irq_optional(pdev, 0);
> - if (bt_bmc->irq < 0)
> + if (bt_bmc->irq < 0 && bt_bmc->irq != -ENXIO)
> return bt_bmc->irq;
>
> rc = devm_request_irq(dev, bt_bmc->irq, bt_bmc_irq, IRQF_SHARED,
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-08-17 11:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 10:50 [PATCH 1/4] ipmi: bt-bmc: Propagate errors from IRQ configuration phucduc.bui
2026-08-17 10:50 ` [PATCH 2/4] ipmi: bt-bmc: Handle -ENXIO from optional IRQ lookup phucduc.bui
2026-08-17 11:40 ` Corey Minyard [this message]
2026-08-17 14:28 ` Bui Duc Phuc
2026-08-17 17:35 ` Corey Minyard
2026-08-18 6:29 ` Bui Duc Phuc
2026-08-17 10:50 ` [PATCH 3/4] ipmi: bt-bmc: Request IRQ only when available phucduc.bui
2026-08-17 10:50 ` [PATCH 4/4] ipmi: bt-bmc: Check IRQ number correctly phucduc.bui
2026-08-17 11:37 ` [PATCH 1/4] ipmi: bt-bmc: Propagate errors from IRQ configuration Corey Minyard
2026-08-17 14:22 ` 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=aoLzHBRmgwBGem7p@mail.minyard.net \
--to=corey@minyard.net \
--cc=linux-kernel@vger.kernel.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=phucduc.bui@gmail.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®