diff options
author | Sean Anderson | 2020-09-12 17:45:44 -0400 |
---|---|---|
committer | Tom Rini | 2020-10-10 16:50:12 -0400 |
commit | a4326612ac4d5235d3ccf2d3ae40cc78b877ee38 (patch) | |
tree | 143ecdf345e0600dbc804d90e84d3629d1f27ccc /common | |
parent | c3f0278e29ffae81dc24c997523a8eafba503a0c (diff) |
log: syslog: Handle errors in net_init
Since the previous patch, net_init now exposes some errors, so check for
them.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/log_syslog.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/log_syslog.c b/common/log_syslog.c index 2ae703fed71..4eb09157bb9 100644 --- a/common/log_syslog.c +++ b/common/log_syslog.c @@ -39,7 +39,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 */ |