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

Commit b388e6a7 authored by Brian Norris's avatar Brian Norris Committed by Richard Weinberger
Browse files

UBI: fix missing brace control flow



commit 0e707ae7 ("UBI: do propagate positive error codes up") seems
to have produced an unintended change in the control flow here.

Completely untested, but it looks obvious.

Caught by Coverity, which didn't like the indentation. CID 1271184.

Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 3d883483
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -425,10 +425,11 @@ int ubi_eba_read_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,
					ubi_warn(ubi, "corrupted VID header at PEB %d, LEB %d:%d",
					ubi_warn(ubi, "corrupted VID header at PEB %d, LEB %d:%d",
						 pnum, vol_id, lnum);
						 pnum, vol_id, lnum);
					err = -EBADMSG;
					err = -EBADMSG;
				} else
				} else {
					err = -EINVAL;
					err = -EINVAL;
					ubi_ro_mode(ubi);
					ubi_ro_mode(ubi);
				}
				}
			}
			goto out_free;
			goto out_free;
		} else if (err == UBI_IO_BITFLIPS)
		} else if (err == UBI_IO_BITFLIPS)
			scrub = 1;
			scrub = 1;