x86: squash lines for immediate return

arch_cpu_init() can be simpler by this refactoring.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Masahiro Yamada 2016-09-06 22:17:36 +09:00 committed by Tom Rini
parent 8319aeb1da
commit 0a8547a250
4 changed files with 4 additions and 28 deletions

View File

@ -25,15 +25,9 @@ int cpu_mmc_init(bd_t *bis)
#ifndef CONFIG_EFI_APP
int arch_cpu_init(void)
{
int ret;
post_code(POST_CPU_INIT);
ret = x86_cpu_init_f();
if (ret)
return ret;
return 0;
return x86_cpu_init_f();
}
int arch_misc_init(void)

View File

@ -10,13 +10,7 @@
int arch_cpu_init(void)
{
int ret;
post_code(POST_CPU_INIT);
ret = x86_cpu_init_f();
if (ret)
return ret;
return 0;
return x86_cpu_init_f();
}

View File

@ -139,15 +139,9 @@ static void qemu_chipset_init(void)
int arch_cpu_init(void)
{
int ret;
post_code(POST_CPU_INIT);
ret = x86_cpu_init_f();
if (ret)
return ret;
return 0;
return x86_cpu_init_f();
}
#ifndef CONFIG_EFI_STUB

View File

@ -94,15 +94,9 @@ static int __maybe_unused disable_igd(void)
int arch_cpu_init(void)
{
int ret;
post_code(POST_CPU_INIT);
ret = x86_cpu_init_f();
if (ret)
return ret;
return 0;
return x86_cpu_init_f();
}
int arch_early_init_r(void)