9
0
Fork 0

UBI: Fix error path in scan_pool()

We have to set "ret", not "err" in case of an error.

Reported-and-tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Richard Weinberger 2013-09-28 15:55:11 +02:00 committed by Sascha Hauer
parent f0986b6f70
commit 4a290f970d
1 changed files with 1 additions and 1 deletions

View File

@ -427,7 +427,7 @@ static int scan_pool(struct ubi_device *ubi, struct ubi_attach_info *ai,
if (be32_to_cpu(ech->image_seq) != ubi->image_seq) {
ubi_err("bad image seq: 0x%x, expected: 0x%x",
be32_to_cpu(ech->image_seq), ubi->image_seq);
err = UBI_BAD_FASTMAP;
ret = UBI_BAD_FASTMAP;
goto out;
}