Commit f240dca8 authored by Richard Weinberger's avatar Richard Weinberger Committed by Artem Bityutskiy

UBI: Fix error path in scan_pool()

We have to set "ret", not "err" in case of an error.
Reported-and-tested-by: default avatarRichard Genoud <richard.genoud@gmail.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent fb10e4d4
...@@ -428,7 +428,7 @@ static int scan_pool(struct ubi_device *ubi, struct ubi_attach_info *ai, ...@@ -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) { if (be32_to_cpu(ech->image_seq) != ubi->image_seq) {
ubi_err("bad image seq: 0x%x, expected: 0x%x", ubi_err("bad image seq: 0x%x, expected: 0x%x",
be32_to_cpu(ech->image_seq), ubi->image_seq); be32_to_cpu(ech->image_seq), ubi->image_seq);
err = UBI_BAD_FASTMAP; ret = UBI_BAD_FASTMAP;
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment