From: Brian Norris <computersforpeace@gmail.com>
To: <linux-mtd@lists.infradead.org>
Cc: Richard Weinberger <richard@nod.at>,
Brian Norris <computersforpeace@gmail.com>,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: [PATCH] UBI: fastmap: correct error check
Date: Tue, 20 May 2014 22:35:38 -0700 [thread overview]
Message-ID: <1400650538-11234-1-git-send-email-computersforpeace@gmail.com> (raw)
The return value from ubi_io_read_ec_hdr() was stored in 'err', not in
'ret'.
This issue was reported by Coverity Scan.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Richard Weinberger <richard@nod.at>
---
drivers/mtd/ubi/fastmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index c5dad652614d..6de0e10fcea3 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -423,7 +423,7 @@ static int scan_pool(struct ubi_device *ubi, struct ubi_attach_info *ai,
pnum, err);
ret = err > 0 ? UBI_BAD_FASTMAP : err;
goto out;
- } else if (ret == UBI_IO_BITFLIPS)
+ } else if (err == UBI_IO_BITFLIPS)
scrub = 1;
/*
--
1.7.9.5
next reply other threads:[~2014-05-21 5:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 5:35 Brian Norris [this message]
2014-05-21 7:29 ` [PATCH] UBI: fastmap: correct error check Richard Weinberger
2014-06-09 17:01 ` Brian Norris
2014-06-10 6:56 ` Artem Bityutskiy
2014-07-09 1:58 ` Brian Norris
2014-07-16 5:34 ` Artem Bityutskiy
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=1400650538-11234-1-git-send-email-computersforpeace@gmail.com \
--to=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
/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.