From aea832cc6b8f626c9264fc0fd7d294570223b1a2 Mon Sep 17 00:00:00 2001 From: hauke Date: Tue, 2 Jun 2009 20:10:29 +0000 Subject: [ifxmips] Fix accessing array after it end. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16301 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'target/linux/ifxmips') diff --git a/target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c b/target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c index b4faf0535..a2d30cd0b 100644 --- a/target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c +++ b/target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c @@ -232,9 +232,9 @@ static int ifxmips_mtd_probe(struct platform_device *dev) if (err <= 0) { if (ifxmips_has_brn_block()) { - parts[4].size -= ifxmips_mtd->erasesize; - parts[5].offset = ifxmips_mtd->size - ifxmips_mtd->erasesize; - parts[5].size = ifxmips_mtd->erasesize; + parts[3].size -= ifxmips_mtd->erasesize; + parts[4].offset = ifxmips_mtd->size - ifxmips_mtd->erasesize; + parts[4].size = ifxmips_mtd->erasesize; } else { num_parts--; } -- cgit v1.2.3