summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-09-22 10:45:34 +0200
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-09-26 13:42:41 +0300
commit170505f58f01d89dea2667d484cb5da18fb9ffd9 (patch)
tree3cd270b07f5900bd2f1394dfed80ef32524536e5
parent4b1a43eab1ab0b1d05bc0c2aa823262da2445a7f (diff)
downloadblackbird-op-linux-170505f58f01d89dea2667d484cb5da18fb9ffd9.tar.gz
blackbird-op-linux-170505f58f01d89dea2667d484cb5da18fb9ffd9.zip
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.c5
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:
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;
OpenPOWER on IntegriCloud