Skip to content

Commit

Permalink
UBI: ubi_eba_read_leb: Remove in vain variable assignment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Weinberger authored and Artem Bityutskiy committed Sep 26, 2014
1 parent 4b1a43e commit 170505f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/mtd/ubi/eba.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,9 @@ int ubi_eba_read_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,

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;
Expand Down

0 comments on commit 170505f

Please sign in to comment.