From: Andreas Pretzsch Date: Mon, 17 Sep 2012 16:17:21 +0000 (+0200) Subject: mfd: Use devm_* APIs for mc13xxx: remove leftover kfree X-Git-Tag: v3.7-rc1~112^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0cb166e0538b2b2fe746bfa3c82ef6fece9b8888;p=platform%2Fkernel%2Flinux-exynos.git 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. Signed-off-by: Andreas Pretzsch Reviewed-by: Axel Lin Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c index 1ec79b5..1aba023 100644 --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c @@ -676,7 +676,6 @@ int mc13xxx_common_init(struct mc13xxx *mc13xxx, err_mask: err_revision: mc13xxx_unlock(mc13xxx); - kfree(mc13xxx); return ret; }