Skip to content

Commit

Permalink
UBI: fix missing brace control flow
Browse files Browse the repository at this point in the history
[ Upstream commit b388e6a ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
  • Loading branch information
Brian Norris authored and Sasha Levin committed Jun 6, 2016
1 parent 920618c commit 2afcfc1
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("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 2afcfc1

Please sign in to comment.