diff options
| author | Justin Yeh <justin.yeh@mediatek.com> | 2026-07-23 11:58:13 +0800 |
|---|---|---|
| committer | Linus Walleij <linusw@kernel.org> | 2026-07-25 14:57:25 +0200 |
| commit | 88292b7103d260e3e606eb3bb2794060a5fde48e (patch) | |
| tree | e1b9d3cdc06d74b5d110d9322d489ec849d06aac /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 9c650317ba553d297f3fc5f0ae40ec53d86f9dab (diff) | |
pinctrl: mediatek: free EINT resources on unbind
mtk_eint_do_init() creates an IRQ domain, populates it with a mapping for
every EINT line and installs a chained handler on the parent interrupt,
but none of these are ever released. This was harmless while the drivers
were built-in, but now that they can be built as modules and
unbound/rmmod'd it leaves behind a dangling IRQ domain, interrupt mappings
whose chip data points at freed memory, and a chained handler that keeps
firing into that freed data.
The plain allocations in mtk_eint_do_init() already use the device-managed
devm_*() helpers, so tear the remaining resources down the same way:
register a devm action that detaches the chained handler, waits for any
in-flight handler to finish, disposes of the per-line mappings and removes
the IRQ domain. This mirrors the device-managed lifecycle adopted for the
GPIO chip and keeps the whole EINT setup self-cleaning on unbind.
Fixes: e46df235b4e6 ("pinctrl: mediatek: refactor EINT related code for all MediaTek pinctrl can fit")
Signed-off-by: Justin Yeh <justin.yeh@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
