]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mfd: mt6397-irq: Fix missing irq_domain_remove() in error path
authorHaotian Zhang <vulab@iscas.ac.cn>
Tue, 18 Nov 2025 12:15:00 +0000 (20:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:31 +0000 (13:09 +0100)
commit68715d885bb6e95d86d8429e83baf76d61c68a1a
tree56180ae09d1f719280ce528553aa5fb7a3082d20
parentd705f1c35080d1728d92d5b0e16c26f792744496
mfd: mt6397-irq: Fix missing irq_domain_remove() in error path

[ Upstream commit b4b1bd1f330fdd13706382be6c90ce9f58cee3f5 ]

If devm_request_threaded_irq() fails after irq_domain_create_linear()
succeeds in mt6397_irq_init(), the function returns without removing
the created IRQ domain, leading to a resource leak.

Call irq_domain_remove() in the error path after a successful
irq_domain_create_linear() to properly release the IRQ domain.

Fixes: a4872e80ce7d ("mfd: mt6397: Extract IRQ related code from core driver")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20251118121500.605-1-vulab@iscas.ac.cn
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/mt6397-irq.c