mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gpio: mvebu: free generic chips on unbind
@ 2026-07-07 23:23 Rosen Penev
  2026-07-08 12:05 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2026-07-07 23:23 UTC (permalink / raw)
  To: linux-gpio; +Cc: Linus Walleij, Bartosz Golaszewski, Jason Gunthorpe, open list

irq_alloc_domain_generic_chips() allocates generic chip data that must
be freed via irq_domain_remove_generic_chips(). The devres action
mvebu_gpio_remove_irq_domain() only called irq_domain_remove(), which
only frees the generic chips if IRQ_DOMAIN_FLAG_DESTROY_GC is set.
Call irq_domain_remove_generic_chips() explicitly before
irq_domain_remove() instead.

Fixes: 812d47889a8e ("gpio/mvebu: Use irq_domain_add_linear")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 93568bc78437..236dd2d91d3e 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -1139,6 +1139,7 @@ static void mvebu_gpio_remove_irq_domain(void *data)
 {
 	struct irq_domain *domain = data;
 
+	irq_domain_remove_generic_chips(domain);
 	irq_domain_remove(domain);
 }
 
-- 
2.55.0


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

* Re: [PATCH] gpio: mvebu: free generic chips on unbind
  2026-07-07 23:23 [PATCH] gpio: mvebu: free generic chips on unbind Rosen Penev
@ 2026-07-08 12:05 ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2026-07-08 12:05 UTC (permalink / raw)
  To: linux-gpio, Rosen Penev
  Cc: Bartosz Golaszewski, Linus Walleij, Bartosz Golaszewski,
	Jason Gunthorpe, linux-kernel


On Tue, 07 Jul 2026 16:23:58 -0700, Rosen Penev wrote:
> irq_alloc_domain_generic_chips() allocates generic chip data that must
> be freed via irq_domain_remove_generic_chips(). The devres action
> mvebu_gpio_remove_irq_domain() only called irq_domain_remove(), which
> only frees the generic chips if IRQ_DOMAIN_FLAG_DESTROY_GC is set.
> Call irq_domain_remove_generic_chips() explicitly before
> irq_domain_remove() instead.
> 
> [...]

Applied, thanks!

[1/1] gpio: mvebu: free generic chips on unbind
      https://git.kernel.org/brgl/c/b11c513ad943f35cf5e8007d3a56279c79b7ed4b

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

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

end of thread, other threads:[~2026-07-08 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-07 23:23 [PATCH] gpio: mvebu: free generic chips on unbind Rosen Penev
2026-07-08 12:05 ` Bartosz Golaszewski

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®