mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04: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 <[email protected]> Acked-by: Kees Cook <[email protected]> Signed-off-by: Tony Luck <[email protected]>
This commit is contained in:
parent
b36f4be3de
commit
08b326d071
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue