Skip to content

Commit 3f84e45

Browse files
Boris Brezillonrichardweinberger
authored andcommitted
UBI: fix add_fastmap() to use the vid_hdr passed in argument
add_fastmap() is passed a ubi_vid_hdr pointer in argument, but is referencing the global vidh pointer. Even if this is correct from a functional point of view (vidh and vid_hdr point to the same object), it is confusing. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent f5f9d43 commit 3f84e45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mtd/ubi/attach.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ static int add_fastmap(struct ubi_attach_info *ai, int pnum,
197197
return -ENOMEM;
198198

199199
aeb->pnum = pnum;
200-
aeb->vol_id = be32_to_cpu(vidh->vol_id);
201-
aeb->sqnum = be64_to_cpu(vidh->sqnum);
200+
aeb->vol_id = be32_to_cpu(vid_hdr->vol_id);
201+
aeb->sqnum = be64_to_cpu(vid_hdr->sqnum);
202202
aeb->ec = ec;
203203
list_add(&aeb->u.list, &ai->fastmap);
204204

0 commit comments

Comments
 (0)