summaryrefslogtreecommitdiff
path: root/common/cmd_dfu.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_dfu.c')
-rw-r--r--common/cmd_dfu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c
index 01d6b3a..83ef324 100644
--- a/common/cmd_dfu.c
+++ b/common/cmd_dfu.c
@@ -50,12 +50,15 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (ret)
return CMD_RET_FAILURE;
- if (strcmp(argv[3], "list") == 0) {
+ if (argc > 3 && strcmp(argv[3], "list") == 0) {
dfu_show_entities();
goto done;
}
+#ifdef CONFIG_TRATS
board_usb_init();
+#endif
+
g_dnl_register(s);
while (1) {
if (ctrlc())