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>
return -ENOMEM;
aeb->pnum = pnum;
- aeb->vol_id = be32_to_cpu(vidh->vol_id);
- aeb->sqnum = be64_to_cpu(vidh->sqnum);
+ aeb->vol_id = be32_to_cpu(vid_hdr->vol_id);
+ aeb->sqnum = be64_to_cpu(vid_hdr->sqnum);
aeb->ec = ec;
list_add(&aeb->u.list, &ai->fastmap);