Skip to content

Commit b4b1bd1

Browse files
ISCAS-Vulablag-linaro
authored andcommitted
mfd: mt6397-irq: Fix missing irq_domain_remove() in error path
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: a4872e8 ("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>
1 parent 9494cb2 commit b4b1bd1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/mfd/mt6397-irq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ int mt6397_irq_init(struct mt6397_chip *chip)
229229
if (ret) {
230230
dev_err(chip->dev, "failed to register irq=%d; err: %d\n",
231231
chip->irq, ret);
232+
irq_domain_remove(chip->irq_domain);
232233
return ret;
233234
}
234235

0 commit comments

Comments
 (0)