From: Brian Norris Date: Mon, 23 Feb 2015 21:07:22 +0000 (-0800) Subject: UBI: fix missing brace control flow X-Git-Tag: v4.14-rc1~5586^2~51 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b388e6a7a6ba988998ddd83919ae8d3debf1a13d;p=platform%2Fkernel%2Flinux-rpi.git 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 Cc: Dan Carpenter Signed-off-by: Richard Weinberger --- 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)