From: "Marco Scardovi (scardracs)" <scardracs@disroot.org>
To: linusw@kernel.org, brgl@kernel.org, heiko@sntech.de
Cc: linux-gpio@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
"Marco Scardovi (scardracs)" <scardracs@disroot.org>
Subject: [PATCH 0/2] gpio: rockchip: fix resource leaks and teardown bugs
Date: Mon, 25 May 2026 18:39:37 +0200 [thread overview]
Message-ID: <20260525164230.43307-1-scardracs@disroot.org> (raw)
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
next reply other threads:[~2026-05-25 16:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 16:39 Marco Scardovi (scardracs) [this message]
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
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=20260525164230.43307-1-scardracs@disroot.org \
--to=scardracs@disroot.org \
--cc=brgl@kernel.org \
--cc=heiko@sntech.de \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
/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