Skip to content

Commit 170505f

Browse files
richardweinbergerdedekind
authored andcommitted
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>
1 parent 4b1a43e commit 170505f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎drivers/mtd/ubi/eba.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,9 @@ int ubi_eba_read_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,
441441

442442
err = ubi_io_read_data(ubi, buf, pnum, offset, len);
443443
if (err) {
444-
if (err == UBI_IO_BITFLIPS) {
444+
if (err == UBI_IO_BITFLIPS)
445445
scrub = 1;
446-
err = 0;
447-
} else if (mtd_is_eccerr(err)) {
446+
else if (mtd_is_eccerr(err)) {
448447
if (vol->vol_type == UBI_DYNAMIC_VOLUME)
449448
goto out_unlock;
450449
scrub = 1;

0 commit comments

Comments
 (0)