Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08b326d0 authored by Wei Yongjun's avatar Wei Yongjun Committed by Tony Luck
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent b36f4be3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);