The Linux Kernel Mailing List
 help / color / mirror / Atom feed
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 1/4] ipmi: bt-bmc: Propagate errors from IRQ configuration
Date: Mon, 17 Aug 2026 06:37:55 -0500	[thread overview]
Message-ID: <aoLykydTdEzTFMEd@mail.minyard.net> (raw)
In-Reply-To: <20260817105041.63224-1-phucduc.bui@gmail.com>

On Mon, Aug 17, 2026 at 05:50:38PM +0700, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
> 
> Check and propagate the return value of bt_bmc_config_irq() instead of
> ignoring errors during probe.
> 
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
>  drivers/char/ipmi/bt-bmc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
> index a179d4797011..7d3944bda8db 100644
> --- a/drivers/char/ipmi/bt-bmc.c
> +++ b/drivers/char/ipmi/bt-bmc.c
> @@ -436,7 +436,9 @@ static int bt_bmc_probe(struct platform_device *pdev)
>  		return rc;
>  	}
>  
> -	bt_bmc_config_irq(bt_bmc, pdev);
> +	rc = bt_bmc_config_irq(bt_bmc, pdev);
> +	if (rc)
> +		return rc;

No, this will break the driver if the interrupt is not available.  That
function is badly written (it should return the irq and the irq should
be set here) but if it encounters an error, it should use the timer.

-corey

>  
>  	if (bt_bmc->irq >= 0) {
>  		dev_info(dev, "Using IRQ %d\n", bt_bmc->irq);
> -- 
> 2.43.0
> 

  parent reply	other threads:[~2026-08-17 11:38 UTC|newest]

Thread overview: 8+ 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
2026-08-17 14:28     ` 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 ` Corey Minyard [this message]
2026-08-17 14:22   ` [PATCH 1/4] ipmi: bt-bmc: Propagate errors from IRQ configuration 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=aoLykydTdEzTFMEd@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