mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Borleis <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] state: don't use uninitialized variable
Date: Thu, 17 Aug 2017 11:32:33 +0200	[thread overview]
Message-ID: <20170817093233.979-2-jbe@pengutronix.de> (raw)
In-Reply-To: <20170817093233.979-1-jbe@pengutronix.de>

Printing 'ret' makes no sense.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 common/state/backend_storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/state/backend_storage.c b/common/state/backend_storage.c
index 825db824b..c6ebe8624 100644
--- a/common/state/backend_storage.c
+++ b/common/state/backend_storage.c
@@ -214,7 +214,7 @@ static int mtd_get_meminfo(const char *path, struct mtd_info_user *meminfo)
 
 	fd = open(path, O_RDONLY);
 	if (fd < 0) {
-		pr_err("Failed to open '%s', %d\n", path, ret);
+		pr_err("Failed to open '%s', %d\n", path, fd);
 		return fd;
 	}
 
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2017-08-17  9:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17  9:32 [PATCH 1/2] state: use the given backend storage type name Juergen Borleis
2017-08-17  9:32 ` Juergen Borleis [this message]
2017-09-06 12:11 ` Sascha Hauer

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=20170817093233.979-2-jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox