Skip to content

Commit

Permalink
UBI: fix missing brace control flow
Browse files Browse the repository at this point in the history
commit 0e707ae ("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: Brian Norris <computersforpeace@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Brian Norris authored and Richard Weinberger committed Feb 23, 2015
1 parent 3d88348 commit b388e6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mtd/ubi/eba.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,10 @@ 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",
pnum, vol_id, lnum);
err = -EBADMSG;
} else
} else {
err = -EINVAL;
ubi_ro_mode(ubi);
}
}
goto out_free;
} else if (err == UBI_IO_BITFLIPS)
Expand Down

0 comments on commit b388e6a

Please sign in to comment.