]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mfd: Use devm_* APIs for mc13xxx: remove leftover kfree
authorAndreas Pretzsch <apr@cn-eng.de>
Mon, 17 Sep 2012 16:17:21 +0000 (18:17 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 21 Sep 2012 21:40:35 +0000 (23:40 +0200)
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 <apr@cn-eng.de>
Reviewed-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/mc13xxx-core.c

index 1ec79b54bd2f12f304c57f92633cc8c125a0d389..1aba0238f426a01935100efbf904b192199a3d9a 100644 (file)
@@ -676,7 +676,6 @@ int mc13xxx_common_init(struct mc13xxx *mc13xxx,
 err_mask:
 err_revision:
                mc13xxx_unlock(mc13xxx);
-               kfree(mc13xxx);
                return ret;
        }