]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_net.c
* Patch by Andreas Oberritter, 09 Nov 2002:
[karo-tx-uboot.git] / common / cmd_net.c
index c9ce85ffe31588f4c483fa427aacf10bce01aa94..a1ff2ba9a6bcdc2f3fd0aec40f3594bd472740b2 100644 (file)
@@ -132,12 +132,16 @@ netboot_common (int proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
                return 1;
        }
 
-       if ((size = NetLoop(proto)) == 0)
+       if ((size = NetLoop(proto)) < 0)
                return 1;
 
        /* NetLoop ok, update environment */
        netboot_update_env();
 
+       /* done if no file was loaded (no errors though) */
+       if (size == 0)
+               return 0;
+
        /* flush cache */
        flush_cache(load_addr, size);