[PATCH 4/7] xyz-modem: Close stream after processing/sending terminate sequence
    Pali Rohár 
    pali at kernel.org
       
    Tue Aug  3 16:28:41 CEST 2021
    
    
  
Obviously it is not possible to send terminate sequence over stream after
closing stream.
Signed-off-by: Pali Rohár <pali at kernel.org>
---
 cmd/load.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/load.c b/cmd/load.c
index b7894d7db02a..fb8c191fb64f 100644
--- a/cmd/load.c
+++ b/cmd/load.c
@@ -1006,8 +1006,8 @@ static ulong load_serial_ymodem(ulong offset, int mode)
 		printf("%s\n", xyzModem_error(err));
 	}
 
-	xyzModem_stream_close(&err);
 	xyzModem_stream_terminate(false, &getcxmodem);
+	xyzModem_stream_close(&err);
 
 
 	flush_cache(offset, ALIGN(size, ARCH_DMA_MINALIGN));
-- 
2.20.1
    
    
More information about the U-Boot
mailing list