diff options
Diffstat (limited to 'board/keymile/km_arm')
-rw-r--r-- | board/keymile/km_arm/km_arm.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index 3a33b5a511..d7cbd7a2a9 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -186,10 +186,8 @@ int board_init(void) int do_spi_toggle(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u32 tmp; - if (argc < 2) { - cmd_usage(cmdtp); - return 1; - } + if (argc < 2) + return cmd_usage(cmdtp); if ((strcmp(argv[1], "off") == 0)) { printf("SPI FLASH disabled, NAND enabled\n"); @@ -214,8 +212,7 @@ int do_spi_toggle(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) tmp = readl(KW_GPIO0_BASE); writel(tmp & (~FLASH_GPIO_PIN) , KW_GPIO0_BASE); } else { - cmd_usage(cmdtp); - return 1; + return cmd_usage(cmdtp); } return 0; |