All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 3/3] log: syslog: Handle errors in net_init
Date: Sat, 12 Sep 2020 17:45:44 -0400	[thread overview]
Message-ID: <20200912214544.362594-4-seanga2@gmail.com> (raw)
In-Reply-To: <20200912214544.362594-1-seanga2@gmail.com>

Since the previous patch, net_init now exposes some errors, so check for
them.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 common/log_syslog.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/log_syslog.c b/common/log_syslog.c
index 149ff5af31..aaa0fcfa48 100644
--- a/common/log_syslog.c
+++ b/common/log_syslog.c
@@ -46,7 +46,9 @@ static int log_syslog_emit(struct log_device *ldev, struct log_rec *rec)
 	processing_msg = 1;
 
 	/* 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 */
-- 
2.28.0

  parent reply	other threads:[~2020-09-12 21:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-12 21:45 [PATCH 0/3] log: Fix segfault in sandbox when LOG_LEVEL_DEFAULT >= LOGL_DEBUG Sean Anderson
2020-09-12 21:45 ` [PATCH 1/3] dev: Disambiguate errors in uclass_find Sean Anderson
2020-09-17  1:09   ` Simon Glass
2020-09-17  1:44     ` Sean Anderson
2020-09-17  3:44       ` Simon Glass
2020-09-12 21:45 ` [PATCH 2/3] net: Expose some errors generated in net_init Sean Anderson
2020-09-17  1:09   ` Simon Glass
2020-10-12  1:15   ` Tom Rini
2020-09-12 21:45 ` Sean Anderson [this message]
2020-09-17  1:09   ` [PATCH 3/3] log: syslog: Handle errors " Simon Glass
2020-10-12  1:15   ` Tom Rini
2020-09-13 20:13 ` [PATCH 0/3] log: Fix segfault in sandbox when LOG_LEVEL_DEFAULT >= LOGL_DEBUG Sean Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200912214544.362594-4-seanga2@gmail.com \
    --to=seanga2@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.