kernel: mtdsplit_uimage: fix passed info about buf size
authorRafał Miłecki <zajec5@gmail.com>
Thu, 12 Feb 2015 20:13:20 +0000 (20:13 +0000)
committerRafał Miłecki <zajec5@gmail.com>
Thu, 12 Feb 2015 20:13:20 +0000 (20:13 +0000)
We obviously can't use sizeof(*buf) which is always 1.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 44424

target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c

index 2bb5e9aff8aeedec86a737301f636d5c546b4ab4..2602f98b55666fa561cc59287d720a3b3b8f1239 100644 (file)
@@ -113,11 +113,11 @@ static int __mtdsplit_parse_uimage(struct mtd_info *master,
 
                uimage_size = 0;
 
-               ret = read_uimage_header(master, offset, buf, sizeof(*buf));
+               ret = read_uimage_header(master, offset, buf, MAX_HEADER_LEN);
                if (ret)
                        continue;
 
-               ret = find_header(buf, sizeof(*buf));
+               ret = find_header(buf, MAX_HEADER_LEN);
                if (ret < 0) {
                        pr_debug("no valid uImage found in \"%s\" at offset %llx\n",
                                 master->name, (unsigned long long) offset);