mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
mfd: mt6358-irq: Fix missing irq_domain_remove() in error path
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: 2b91c28f2a ("mfd: Add support for the MediaTek MT6358 PMIC")
Signed-off-by: Haotian Zhang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
1 parent
b4b1bd1f33
commit
384bd58bf7
1 file changed
+1
@@ -285,6 +285,7 @@ int mt6358_irq_init(struct mt6397_chip *chip)
|
||||
if (ret) {
|
||||
dev_err(chip->dev, "Failed to register IRQ=%d, ret=%d\n",
|
||||
chip->irq, ret);
|
||||
irq_domain_remove(chip->irq_domain);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user