Skip to content

Commit 32ffed0

Browse files
Jiasheng Jiangbroonie
authored andcommitted
regmap-irq: Add missing kfree()
Add kfree() for "d->main_status_buf" to the error-handling path to prevent a memory leak. Fixes: a2d2184 ("regmap: regmap-irq: Add main status register support") Cc: [email protected] # v5.1+ Signed-off-by: Jiasheng Jiang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 2014c95 commit 32ffed0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/base/regmap/regmap-irq.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,7 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
906906
kfree(d->wake_buf);
907907
kfree(d->mask_buf_def);
908908
kfree(d->mask_buf);
909+
kfree(d->main_status_buf);
909910
kfree(d->status_buf);
910911
kfree(d->status_reg_buf);
911912
if (d->config_buf) {
@@ -981,6 +982,7 @@ void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
981982
kfree(d->wake_buf);
982983
kfree(d->mask_buf_def);
983984
kfree(d->mask_buf);
985+
kfree(d->main_status_buf);
984986
kfree(d->status_reg_buf);
985987
kfree(d->status_buf);
986988
if (d->config_buf) {

0 commit comments

Comments
 (0)