diff --git a/src/main.c b/src/main.c index a94777f..32d0247 100644 --- a/src/main.c +++ b/src/main.c @@ -781,9 +781,12 @@ int main(int argc, char **argv) { usb_close_device(usb_dev); usb_dev = NULL; - if ( ret != 0 ) + if ( ret != -EAGAIN ) continue; + if ( ret != 0 ) + goto clean; + if ( dev_flash ) { dev_cold_flash = 0; continue;