]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fastboot: Proper download gadget unregister and clear when cable is missing
authorPaul Kocialkowski <contact@paulk.fr>
Sat, 28 Mar 2015 17:22:49 +0000 (18:22 +0100)
committerLukasz Majewski <l.majewski@samsung.com>
Tue, 14 Apr 2015 08:19:05 +0000 (10:19 +0200)
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
common/cmd_fastboot.c

index 30bfc9b709386ded6e2b549407cfbf1c2c82e26a..d52ccfb3100eb8450af627c269202b57e7d35071 100644 (file)
@@ -23,6 +23,8 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
        if (!g_dnl_board_usb_cable_connected()) {
                puts("\rUSB cable not detected.\n" \
                     "Command exit.\n");
+               g_dnl_unregister();
+               g_dnl_clear_detach();
                return CMD_RET_FAILURE;
        }