Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] gpio: rockchip: fix resource leaks and teardown bugs
@ 2026-05-25 16:39 Marco Scardovi (scardracs)
  2026-05-25 16:39 ` [PATCH 1/2] gpio: rockchip: convert bank->clk to devm_clk_get_enabled() Marco Scardovi (scardracs)
  2026-05-25 16:39 ` [PATCH 2/2] gpio: rockchip: fix teardown bugs and resource leaks Marco Scardovi (scardracs)
  0 siblings, 2 replies; 11+ messages in thread
From: Marco Scardovi (scardracs) @ 2026-05-25 16:39 UTC (permalink / raw)
  To: linusw, brgl, heiko
  Cc: linux-gpio, linux-rockchip, linux-arm-kernel, linux-kernel,
	Marco Scardovi (scardracs)

This series fixes several resource leaks and teardown issues in the
rockchip gpio driver probe error paths and remove() callback.

The patches included in this series:
1. Convert the main clock (bank->clk) to use devm_clk_get_enabled(),
   simplifying the code and fixing an existing clk_put() leak.
2. Fix several teardown bugs and resource leaks:
   - Fix a reference leak for the debounce clock (bank->db_clk)
     by properly releasing it with a devm action.
   - Fix a potential kernel panic on module unload by unregistering the
     chained IRQ handler (rockchip_irq_demux) in the remove() callback.
   - Fix an IRQ domain and generic chip memory leak by calling
     irq_domain_remove() during module unload.

Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Marco Scardovi <scardracs@disroot.org>


Marco Scardovi (scardracs) (2):
  gpio: rockchip: convert bank->clk to devm_clk_get_enabled()
  gpio: rockchip: fix teardown bugs and resource leaks

 drivers/gpio/gpio-rockchip.c | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

-- 
2.54.0



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

end of thread, other threads:[~2026-05-27  8:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-25 16:39 [PATCH 0/2] gpio: rockchip: fix resource leaks and teardown bugs Marco Scardovi (scardracs)
2026-05-25 16:39 ` [PATCH 1/2] gpio: rockchip: convert bank->clk to devm_clk_get_enabled() Marco Scardovi (scardracs)
2026-05-25 16:39 ` [PATCH 2/2] gpio: rockchip: fix teardown bugs and resource leaks Marco Scardovi (scardracs)
2026-05-26 10:53   ` Bartosz Golaszewski
2026-05-26 17:02     ` [PATCH v2 0/2] gpio: rockchip: fix resource leaks and teardown bugs Marco Scardovi
2026-05-26 17:02       ` [PATCH v2 1/2] gpio: rockchip: convert bank->clk to devm_clk_get_enabled() Marco Scardovi
2026-05-26 17:02       ` [PATCH v2 2/2] gpio: rockchip: teardown bugs and resource leaks Marco Scardovi
2026-05-27  8:11         ` Bartosz Golaszewski
2026-05-27  8:10       ` [PATCH v2 0/2] gpio: rockchip: fix resource leaks and teardown bugs Bartosz Golaszewski
2026-05-27  8:12         ` Bartosz Golaszewski
2026-05-27  8:17       ` Bartosz Golaszewski

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