From 9484f5577e65192808f8752552f7f1de22e48a27 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Sun, 5 Apr 2015 18:30:05 +0200 Subject: arch/arm64/boot.c: Only return if condition is met Fix up commit b3847e64 (program loading: add prog_run() function), which misses the braces for the if statement, causing the function also to return if a non-payload program should be run causing the rest of the stages never to be run. Change-Id: I04940b218ba71e82af769c8db574528f830d0cbb Found-by: Coverity, CID 1293136: Control flow issues (NESTING_INDENT_MISMATCH) Signed-off-by: Paul Menzel Reviewed-on: http://review.coreboot.org/9306 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/arch/arm64/boot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/arch/arm64/boot.c b/src/arch/arm64/boot.c index 312ffdddc9..f62ceb66ef 100644 --- a/src/arch/arm64/boot.c +++ b/src/arch/arm64/boot.c @@ -68,9 +68,10 @@ void arch_prog_run(struct prog *prog) void (*doit)(void *); void *arg; - if (ENV_RAMSTAGE && prog->type == PROG_PAYLOAD) + if (ENV_RAMSTAGE && prog->type == PROG_PAYLOAD) { run_payload(prog); return; + } doit = prog_entry(prog); arg = prog_entry_arg(prog); -- cgit v1.2.3