do_zboot_setup() invokes zboot_setup() twice: once with proper error
reporting, and again immediately afterwards with no diagnostic. The
second call re-runs the entire boot parameter setup on the
already-populated zero page, which is at best wasted work and at
worst leaves the structure in an unexpected state.
Drop the stray second invocation; the first call already covers both
success and failure handling.
Fixes: cb19931ee56 ("x86: zboot: Drop intermediate zboot_setup() function")
Signed-off-by: Naveen Kumar Chaudhary <[email protected]>
---
cmd/x86/zboot.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/cmd/x86/zboot.c b/cmd/x86/zboot.c
index 3876d163236..cc7292e10b7 100644
--- a/cmd/x86/zboot.c
+++ b/cmd/x86/zboot.c
@@ -66,9 +66,6 @@ static int do_zboot_setup(struct cmd_tbl *cmdtp, int flag,
int argc,
return CMD_RET_FAILURE;
}
- if (zboot_setup())
- return CMD_RET_FAILURE;
-
return 0;
}
--
2.43.0