]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_thordown.c
JFFS2: Speed up and fix comparison functions
[karo-tx-uboot.git] / common / cmd_thordown.c
index 2dd750928e41ad39c2a924b38140c898f5c114e7..436b7f56315eb5985016d4d597c6c8ba94959885 100644 (file)
@@ -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;