linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] UBI: ubi_eba_read_leb: Remove in vain variable assignment
@ 2014-09-22  8:45 Richard Weinberger
  2014-09-22  8:45 ` [PATCH 2/3] UBI: wl: Rename cancel flag to shutdown Richard Weinberger
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Richard Weinberger @ 2014-09-22  8:45 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd, linux-kernel, Richard Weinberger

There is no need to set err, it will be overwritten in any case
later at:
        if (scrub)
                err = ubi_wl_scrub_peb(ubi, pnum);

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 drivers/mtd/ubi/eba.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 0e11671d..2402d3b 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -441,10 +441,9 @@ retry:
 
 	err = ubi_io_read_data(ubi, buf, pnum, offset, len);
 	if (err) {
-		if (err == UBI_IO_BITFLIPS) {
+		if (err == UBI_IO_BITFLIPS)
 			scrub = 1;
-			err = 0;
-		} else if (mtd_is_eccerr(err)) {
+		else if (mtd_is_eccerr(err)) {
 			if (vol->vol_type == UBI_DYNAMIC_VOLUME)
 				goto out_unlock;
 			scrub = 1;
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-29 22:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-22  8:45 [PATCH 1/3] UBI: ubi_eba_read_leb: Remove in vain variable assignment Richard Weinberger
2014-09-22  8:45 ` [PATCH 2/3] UBI: wl: Rename cancel flag to shutdown Richard Weinberger
2014-09-22  8:45 ` [PATCH 3/3] UBI: Fix possible deadlock in erase_worker() Richard Weinberger
2014-09-26 10:40   ` Artem Bityutskiy
2014-09-29 22:22     ` Richard Weinberger
2014-09-26 10:46 ` [PATCH 1/3] UBI: ubi_eba_read_leb: Remove in vain variable assignment Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).