X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fcmd_thordown.c;h=436b7f56315eb5985016d4d597c6c8ba94959885;hb=0d6cc1f8de30546c93109d012bb42ed0bf16cea4;hp=2dd750928e41ad39c2a924b38140c898f5c114e7;hpb=d2a3e911390f9fc4d8c0ee4b3c7fc75f4fd3fd19;p=karo-tx-uboot.git diff --git a/common/cmd_thordown.c b/common/cmd_thordown.c index 2dd750928e..436b7f5631 100644 --- a/common/cmd_thordown.c +++ b/common/cmd_thordown.c @@ -26,10 +26,9 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) 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); @@ -57,6 +56,8 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) exit: g_dnl_unregister(); + board_usb_cleanup(controller_index, USB_INIT_DEVICE); +done: dfu_free_entities(); return ret;