summaryrefslogtreecommitdiff
path: root/common/spl/spl_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/spl/spl_net.c')
-rw-r--r--common/spl/spl_net.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
index 217a435..63b20d8 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -8,12 +8,13 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
+#include <errno.h>
#include <spl.h>
#include <net.h>
DECLARE_GLOBAL_DATA_PTR;
-void spl_net_load_image(const char *device)
+int spl_net_load_image(const char *device)
{
int rv;
@@ -24,14 +25,16 @@ void spl_net_load_image(const char *device)
rv = eth_initialize();
if (rv == 0) {
printf("No Ethernet devices found\n");
- hang();
+ return -ENODEV;
}
if (device)
setenv("ethact", device);
rv = net_loop(BOOTP);
if (rv < 0) {
printf("Problem booting with BOOTP\n");
- hang();
+ return rv;
}
spl_parse_image_header((struct image_header *)load_addr);
+
+ return 0;
}