mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
mfd: Use devm_* APIs for mc13xxx: remove leftover kfree
commit e7c706b1e5 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>
This commit is contained in:
committed by
Samuel Ortiz
parent
489422224b
commit
0cb166e053
@@ -676,7 +676,6 @@ int mc13xxx_common_init(struct mc13xxx *mc13xxx,
|
||||
err_mask:
|
||||
err_revision:
|
||||
mc13xxx_unlock(mc13xxx);
|
||||
kfree(mc13xxx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user