X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_thordown.c;h=8ed1dc6f9e47a4089885b4232d85bcaa7b3ab3b6;hb=93e9371f00f1efa9fc570f8e7e8889eae7639868;hp=c4b35114587d09d8badcbb8703480d12d823b9f4;hpb=55aea84b1db277bd86edadb37d11b78d36db7608;p=u-boot diff --git a/common/cmd_thordown.c b/common/cmd_thordown.c index c4b3511458..8ed1dc6f9e 100644 --- a/common/cmd_thordown.c +++ b/common/cmd_thordown.c @@ -22,15 +22,13 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) char *interface = argv[2]; char *devstring = argv[3]; - const char *s = "thor"; int ret; puts("TIZEN \"THOR\" Downloader\n"); - ret = dfu_init_env_entities(interface, simple_strtoul(devstring, - NULL, 10)); + ret = dfu_init_env_entities(interface, devstring); if (ret) - return ret; + goto done; int controller_index = simple_strtoul(usb_controller, NULL, 0); ret = board_usb_init(controller_index, USB_INIT_DEVICE); @@ -40,7 +38,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) goto exit; } - g_dnl_register(s); + g_dnl_register("usb_dnl_thor"); ret = thor_init(); if (ret) { @@ -58,6 +56,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) exit: g_dnl_unregister(); +done: dfu_free_entities(); return ret;