]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mfd: mt6358-irq: Fix missing irq_domain_remove() in error path
authorHaotian Zhang <vulab@iscas.ac.cn>
Tue, 18 Nov 2025 12:14:27 +0000 (20:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:55:02 +0000 (13:55 +0100)
commit579a91ff0845e0e2fd308eeb7bc710c508d5fad8
tree169afa70378eb573adc9b318cc4c6ef0afdd36a6
parent80daa408957ac45cc21ab167dc5c52b3a989ce6e
mfd: mt6358-irq: Fix missing irq_domain_remove() in error path

[ Upstream commit 384bd58bf7095e4c4c8fcdbcede316ef342c630c ]

If devm_request_threaded_irq() fails after irq_domain_add_linear()
succeeds in mt6358_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_add_linear() to properly release the IRQ domain.

Fixes: 2b91c28f2abd ("mfd: Add support for the MediaTek MT6358 PMIC")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20251118121427.583-1-vulab@iscas.ac.cn
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/mt6358-irq.c