fastboot: Proper download gadget unregister and clear when cable is missing

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
This commit is contained in:
Paul Kocialkowski 2015-03-28 18:22:49 +01:00 committed by Lukasz Majewski
parent e2ec3e4612
commit a32d279129

View 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;
}