Skip to contentSkip to conversation

mfd: Use devm_* APIs for mc13xxx: remove leftover kfree

PATCH In review Andreas Pretzsch 3 participants 3 messages Sep 17, 2012 – Sep 19, 2012 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: Use devm_* APIs for mc13xxx: remove leftover kfree

commit e7c706b1e5ccf28eaaf76c7a4613e80b0ca52863 migrated the allocation of struct mc13xxx to devm_* functions, but left a kfree(mc13xxx) in the mc13xxx_common_init error path. Remove it to prevent memory corruption.

---
 drivers/mfd/mc13xxx-core.c |    1 -
 1 file changed, 1 deletion(-)
drivers/mfd/mc13xxx-core.c +0 -1
index 1ec79b5..1aba023 100644
@@ -676,7 +676,6 @@ int mc13xxx_common_init(struct mc13xxx *mc13xxx,
 err_mask:
 err_revision:
 		mc13xxx_unlock(mc13xxx);
-		kfree(mc13xxx);
 		return ret;
 	}
 
Signature · 1 line
1.7.10.4
#2 lore raw
In reply to Andreas Pretzsch

Hi Andreas,

Quoted 8 lines · Andreas Pretzsch

commit e7c706b1e5ccf28eaaf76c7a4613e80b0ca52863 migrated the allocation of struct mc13xxx to devm_* functions, but left a kfree(mc13xxx) in the mc13xxx_common_init error path. Remove it to prevent memory corruption.

---
 drivers/mfd/mc13xxx-core.c |    1 -
 1 file changed, 1 deletion(-)

Patch applied, thanks.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/