From: Wei Yongjun Date: Tue, 2 Jul 2013 01:02:32 +0000 (+0800) Subject: acpi/apei/erst: Add missing iounmap() on error in erst_exec_move_data() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=08b326d071534fe5f122d8dec373cacb40bc7a7b;p=linux-beck.git 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 Acked-by: Kees Cook Signed-off-by: Tony Luck --- diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index 88d0b0f9f92b..6885809abcd8 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c @@ -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);