mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: shao.mingyin@zte.com.cn
Cc: mfd@lists.linux.dev, tony@atomide.com,
	linux-omap@vger.kernel.org, tharvey@gateworks.com,
	support.opensource@diasemi.com, patches@opensource.cirrus.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] mfd: arizona: Free info IRQs on probe failure
Date: Wed, 18 Nov 2026 17:50:18 +0000	[thread overview]
Message-ID: <20261118175018.GG98456@joneslee-macbookpro.roam.internal> (raw)
In-Reply-To: <20261107160745724MOYYTSmCdHXClJi4gEGfn@zte.com.cn>

Arizona people?

On Sat, 07 Nov 2026, shao.mingyin@zte.com.cn wrote:

> From: Shao Mingyin <shao.mingyin@zte.com.cn>
> 
> arizona_dev_init() registers three informational IRQs (CLKGEN error,
> Overclocked and Underclocked) with arizona_request_irq() before adding
> the sub-devices.  If mfd_add_devices() fails the error path only calls
> arizona_irq_exit(), which frees the CTRLIF_ERR/BOOT_DONE IRQs and the
> IRQ chip/domain but leaves these three requested IRQs behind; they are
> freed only in arizona_dev_exit() on the normal removal path.
> 
> As a result the three threaded IRQ handlers stay registered and
> irq_dispose_mapping()/irq_domain_remove() in arizona_irq_exit() act on
> virtual IRQs that are still in use.  Free them in the probe failure path
> too, in the same order as arizona_dev_exit().
> 
> Fixes: 3cc729869475 ("mfd: arizona: Core driver")
> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
> ---
> diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
> index 91975536d14d..37cba7047d76 100644
> --- a/drivers/mfd/arizona-core.c
> +++ b/drivers/mfd/arizona-core.c
> @@ -1373,6 +1373,9 @@ int arizona_dev_init(struct arizona *arizona)
>  	return 0;
>  
>  err_irq:
> +	arizona_free_irq(arizona, ARIZONA_IRQ_UNDERCLOCKED, arizona);
> +	arizona_free_irq(arizona, ARIZONA_IRQ_OVERCLOCKED, arizona);
> +	arizona_free_irq(arizona, ARIZONA_IRQ_CLKGEN_ERR, arizona);
>  	arizona_irq_exit(arizona);
>  err_pm:
>  	pm_runtime_disable(arizona->dev);

-- 
Lee Jones

  reply	other threads:[~2026-11-18 17:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07  8:07 [PATCH 0/5] mfd: Fix an out-of-bounds IRQ map and error-path bugs shao.mingyin
2026-11-07  8:07 ` [PATCH 1/5] mfd: tps65219: Fix out-of-bounds access in tps65214 IRQ map shao.mingyin
2026-11-18 17:46   ` Lee Jones
2026-11-07  8:07 ` [PATCH 2/5] mfd: twl6030-irq: Don't write garbage to interrupt mask on read failure shao.mingyin
2026-11-07  8:07 ` [PATCH 3/5] mfd: arizona: Free info IRQs on probe failure shao.mingyin
2026-11-18 17:50   ` Lee Jones [this message]
2026-11-07  8:07 ` [PATCH 4/5] mfd: da9052: Disable IRQ wake on device removal shao.mingyin
2026-11-18 17:57   ` Lee Jones
2026-11-07  8:07 ` [PATCH 5/5] mfd: gateworks-gsc: Check firmware CRC reads for errors shao.mingyin
2026-11-18 18:22   ` Lee Jones

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=20261118175018.GG98456@joneslee-macbookpro.roam.internal \
    --to=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=patches@opensource.cirrus.com \
    --cc=shao.mingyin@zte.com.cn \
    --cc=support.opensource@diasemi.com \
    --cc=tharvey@gateworks.com \
    --cc=tony@atomide.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®