Skip to content

Commit a15cf34

Browse files
Colin Ian Kingrichardweinberger
authored andcommitted
ubi: fix swapped arguments to call to ubi_alloc_aeb
Static analysis by CoverityScan detected the ec and pnum arguments are in the wrong order on a call to ubi_alloc_aeb. Swap the order to fix this. Fixes: 91f4285 ("UBI: provide helpers to allocate and free aeb elements") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent 843741c commit a15cf34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/ubi/fastmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ static int update_vol(struct ubi_device *ubi, struct ubi_attach_info *ai,
287287

288288
/* new_aeb is newer */
289289
if (cmp_res & 1) {
290-
victim = ubi_alloc_aeb(ai, aeb->ec, aeb->pnum);
290+
victim = ubi_alloc_aeb(ai, aeb->pnum, aeb->ec);
291291
if (!victim)
292292
return -ENOMEM;
293293

0 commit comments

Comments
 (0)