Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 170505f5 authored by Richard Weinberger's avatar Richard Weinberger Committed by Artem Bityutskiy
Browse files

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: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent 4b1a43ea
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;