diff options
author | Richard Weinberger <richard@nod.at> | 2014-09-22 04:45:34 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-09-26 06:42:41 -0400 |
commit | 170505f58f01d89dea2667d484cb5da18fb9ffd9 (patch) | |
tree | 3cd270b07f5900bd2f1394dfed80ef32524536e5 | |
parent | 4b1a43eab1ab0b1d05bc0c2aa823262da2445a7f (diff) |
UBI: ubi_eba_read_leb: Remove in vain variable assignment
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>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rw-r--r-- | drivers/mtd/ubi/eba.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index 0e11671dadc4..2402d3b50171 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c | |||
@@ -441,10 +441,9 @@ retry: | |||
441 | 441 | ||
442 | err = ubi_io_read_data(ubi, buf, pnum, offset, len); | 442 | err = ubi_io_read_data(ubi, buf, pnum, offset, len); |
443 | if (err) { | 443 | if (err) { |
444 | if (err == UBI_IO_BITFLIPS) { | 444 | if (err == UBI_IO_BITFLIPS) |
445 | scrub = 1; | 445 | scrub = 1; |
446 | err = 0; | 446 | else if (mtd_is_eccerr(err)) { |
447 | } else if (mtd_is_eccerr(err)) { | ||
448 | if (vol->vol_type == UBI_DYNAMIC_VOLUME) | 447 | if (vol->vol_type == UBI_DYNAMIC_VOLUME) |
449 | goto out_unlock; | 448 | goto out_unlock; |
450 | scrub = 1; | 449 | scrub = 1; |