From: Joe Hershberger Date: Tue, 19 Jun 2012 14:46:03 +0000 (-0500) Subject: ubi: Only read the actual size of the VID header X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=befc4f3ee911ffb5c9160bf9861887ce2fa1c411;p=thirdparty%2Fu-boot.git ubi: Only read the actual size of the VID header If sub-page reads are supported, this will save reading unneeded data Signed-off-by: Joe Hershberger --- diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 8423894000b..23660e3dd1e 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c @@ -916,7 +916,7 @@ int ubi_io_read_vid_hdr(struct ubi_device *ubi, int pnum, p = (char *)vid_hdr - ubi->vid_hdr_shift; err = ubi_io_read(ubi, p, pnum, ubi->vid_hdr_aloffset, - ubi->vid_hdr_alsize); + UBI_VID_HDR_SIZE); if (err) { if (err != UBI_IO_BITFLIPS && err != -EBADMSG) return err;