diff options
Diffstat (limited to 'common/cmd_net.c')
-rw-r--r-- | common/cmd_net.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/cmd_net.c b/common/cmd_net.c index c9ce85f..a1ff2ba 100644 --- a/common/cmd_net.c +++ b/common/cmd_net.c @@ -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); |