提交 0cb166e0 编写于 作者: A Andreas Pretzsch 提交者: Samuel Ortiz

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

commit e7c706b1 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: NAndreas Pretzsch <apr@cn-eng.de>
Reviewed-by: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 48942222
......@@ -676,7 +676,6 @@ int mc13xxx_common_init(struct mc13xxx *mc13xxx,
err_mask:
err_revision:
mc13xxx_unlock(mc13xxx);
kfree(mc13xxx);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册