Merge branch '2022-01-08-further-important-updates'
[platform/kernel/u-boot.git] / common / log_syslog.c
index 2ae703f..53c4def 100644 (file)
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <log.h>
 #include <net.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -39,7 +40,9 @@ static int log_syslog_emit(struct log_device *ldev, struct log_rec *rec)
        char *log_hostname;
 
        /* Setup packet buffers */
-       net_init();
+       ret = net_init();
+       if (ret)
+               return ret;
        /* Disable hardware and put it into the reset state */
        eth_halt();
        /* Set current device according to environment variables */