]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: squash lines for immediate return
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 6 Sep 2016 13:17:36 +0000 (22:17 +0900)
committerTom Rini <trini@konsulko.com>
Fri, 23 Sep 2016 21:53:49 +0000 (17:53 -0400)
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>
arch/x86/cpu/baytrail/valleyview.c
arch/x86/cpu/ivybridge/ivybridge.c
arch/x86/cpu/qemu/qemu.c
arch/x86/cpu/queensbay/tnc.c

index b31f24e262abf09c254607083c898c2391429fbe..b312d9f9fbea908e3215d8f80938b8aed0766be4 100644 (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)
index c770b53c0811683c0b2f963966149f204add82d3..e817eb9cc2170a5bf960b2485d02f6b24ce33214 100644 (file)
 
 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();
 }
index 680e558ee8bb0a70bff58dac994f1228a99df1fe..c3092f2b9fb872f408750e9ef70e81d09b25dac3 100644 (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
index b226e4c5fd623694aeaeafc9387810cfec2554d9..f307c622c8891472b0cef6371600a4fd50ad01b5 100644 (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)