[PATCH 0/2] gpio: rockchip: fix resource leaks and teardown bugs

From: Marco Scardovi (scardracs)

Date: Mon May 25 2026 - 12:42:56 EST


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@xxxxxxxxxxx>


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