From: Boris Brezillon Date: Fri, 16 Sep 2016 14:59:10 +0000 (+0200) Subject: UBI: fix add_fastmap() to use the vid_hdr passed in argument X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3f84e454eb6cd712bf1fed6870df46bfe8c772f0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Richard Weinberger --- diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index 903becd31410..95138ae2062f 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c @@ -197,8 +197,8 @@ static int add_fastmap(struct ubi_attach_info *ai, int pnum, 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);