Skip to content

Commit 520de30

Browse files
ISCAS-Vulabgregkh
authored andcommitted
mfd: da9055: Fix missing regmap_del_irq_chip() in error path
[ Upstream commit 1b58acf ] When da9055_device_init() fails after regmap_add_irq_chip() succeeds but mfd_add_devices() fails, the error handling path only calls mfd_remove_devices() but forgets to call regmap_del_irq_chip(). This results in a resource leak. Fix this by adding regmap_del_irq_chip() to the error path so that resources are released properly. Fixes: 2896434 ("mfd: DA9055 core driver") Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Link: https://patch.msgid.link/20251010011737.1078-1-vulab@iscas.ac.cn Signed-off-by: Lee Jones <lee@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 22b5b62 commit 520de30

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/mfd/da9055-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ int da9055_device_init(struct da9055 *da9055)
388388

389389
err:
390390
mfd_remove_devices(da9055->dev);
391+
regmap_del_irq_chip(da9055->chip_irq, da9055->irq_data);
391392
return ret;
392393
}
393394

0 commit comments

Comments
 (0)