diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-02-23 13:07:22 -0800 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-02-23 22:17:24 +0100 |
commit | b388e6a7a6ba988998ddd83919ae8d3debf1a13d (patch) | |
tree | 2c5f72cbad445259acf429995d9249bde6ae1f13 /drivers/mtd/ubi | |
parent | 3d883483dc0a7261d73d8b1857a7387a1dd99eee (diff) | |
download | op-kernel-dev-b388e6a7a6ba988998ddd83919ae8d3debf1a13d.zip op-kernel-dev-b388e6a7a6ba988998ddd83919ae8d3debf1a13d.tar.gz |
UBI: fix missing brace control flow
commit 0e707ae79ba3 ("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>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r-- | drivers/mtd/ubi/eba.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index da4c792..16e34b3 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c @@ -425,9 +425,10 @@ retry: 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) |