mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
mfd: mt6397-irq: Fix missing irq_domain_remove() in error path
[ Upstream commitb4b1bd1f33] 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:a4872e80ce("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f75dc8cb41
commit
f620f2a120
@@ -229,6 +229,7 @@ int mt6397_irq_init(struct mt6397_chip *chip)
|
||||
if (ret) {
|
||||
dev_err(chip->dev, "failed to register irq=%d; err: %d\n",
|
||||
chip->irq, ret);
|
||||
irq_domain_remove(chip->irq_domain);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user