2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 03:33:59 +08:00

acpi/apei/erst: Add missing iounmap() on error in erst_exec_move_data()

Add the missing iounmap() before return from erst_exec_move_data()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
Wei Yongjun 2013-07-02 09:02:32 +08:00 committed by Tony Luck
parent b36f4be3de
commit 08b326d071

View File

@ -284,8 +284,10 @@ static int erst_exec_move_data(struct apei_exec_context *ctx,
if (!src)
return -ENOMEM;
dst = ioremap(ctx->dst_base + offset, ctx->var2);
if (!dst)
if (!dst) {
iounmap(src);
return -ENOMEM;
}
memmove(dst, src, ctx->var2);