Skip to content

Commit

Permalink
mfd: Use devm_* APIs for mc13xxx: remove leftover kfree
Browse files Browse the repository at this point in the history
commit e7c706b 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>
  • Loading branch information
Andreas Pretzsch authored and Samuel Ortiz committed Sep 21, 2012
1 parent 4894222 commit 0cb166e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/mfd/mc13xxx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,6 @@ int mc13xxx_common_init(struct mc13xxx *mc13xxx,
err_mask:
err_revision:
mc13xxx_unlock(mc13xxx);
kfree(mc13xxx);
return ret;
}

Expand Down

0 comments on commit 0cb166e

Please sign in to comment.