Skip to content

Commit

Permalink
UBI: Fix error path in scan_pool()
Browse files Browse the repository at this point in the history
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: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
  • Loading branch information
Richard Weinberger authored and Artem Bityutskiy committed Oct 3, 2013
1 parent fb10e4d commit f240dca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/ubi/fastmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,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;
}

Expand Down

0 comments on commit f240dca

Please sign in to comment.