diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-07-01 21:02:32 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2013-08-19 13:13:30 -0400 |
commit | 08b326d071534fe5f122d8dec373cacb40bc7a7b (patch) | |
tree | e5b6165bf1c5d88ffa10ff303a142497611bbba1 | |
parent | b36f4be3de1b123d8601de062e7dbfc904f305fb (diff) |
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>
-rw-r--r-- | drivers/acpi/apei/erst.c | 4 |
1 files changed, 3 insertions, 1 deletions
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, | |||
284 | if (!src) | 284 | if (!src) |
285 | return -ENOMEM; | 285 | return -ENOMEM; |
286 | dst = ioremap(ctx->dst_base + offset, ctx->var2); | 286 | dst = ioremap(ctx->dst_base + offset, ctx->var2); |
287 | if (!dst) | 287 | if (!dst) { |
288 | iounmap(src); | ||
288 | return -ENOMEM; | 289 | return -ENOMEM; |
290 | } | ||
289 | 291 | ||
290 | memmove(dst, src, ctx->var2); | 292 | memmove(dst, src, ctx->var2); |
291 | 293 | ||