karo: tx6: check ctrlc before returning error code for unsupported baseboard
authorLothar Waßmann <LW@KARO-electronics.de>
Thu, 18 Feb 2016 17:18:43 +0000 (18:18 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 18 Feb 2016 17:18:43 +0000 (18:18 +0100)
board/karo/tx6/tx6qdl.c
board/karo/tx6/tx6ul.c

index c21f1c4..f0076e6 100644 (file)
@@ -1378,7 +1378,6 @@ static void tx6qdl_set_cpu_clock(void)
 
 int board_late_init(void)
 {
-       int ret = 0;
        const char *baseboard;
 
        debug("%s@%d: \n", __func__, __LINE__);
@@ -1423,7 +1422,8 @@ int board_late_init(void)
        } else {
                printf("WARNING: Unsupported baseboard: '%s'\n",
                        baseboard);
-               ret = -EINVAL;
+               if (!had_ctrlc())
+                       return -EINVAL;
        }
 
 exit:
@@ -1431,7 +1431,7 @@ exit:
 
        gpio_set_value(TX6_RESET_OUT_GPIO, 1);
        clear_ctrlc();
-       return ret;
+       return 0;
 }
 
 #ifdef CONFIG_SERIAL_TAG
index ce9450f..7f0133c 100644 (file)
@@ -1280,7 +1280,6 @@ static void tx6ul_set_cpu_clock(void)
 
 int board_late_init(void)
 {
-       int ret = 0;
        const char *baseboard;
 
        debug("%s@%d: \n", __func__, __LINE__);
@@ -1325,7 +1324,8 @@ int board_late_init(void)
        } else {
                printf("WARNING: Unsupported baseboard: '%s'\n",
                        baseboard);
-               ret = -EINVAL;
+               if (!had_ctrlc())
+                       return -EINVAL;
        }
 
 exit:
@@ -1334,7 +1334,7 @@ exit:
        debug("%s@%d: \n", __func__, __LINE__);
 
        clear_ctrlc();
-       return ret;
+       return 0;
 }
 
 #ifdef CONFIG_SERIAL_TAG