From: Nishant Kamat Date: Thu, 3 Jul 2008 09:18:39 +0000 (-0500) Subject: MTD: OMAP2-NAND: Fix partition reading from board info X-Git-Tag: v2.6.26-omap1~54 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b3e668feb7ba45a5058d8c97436b0c8b7a4c1368;p=linux-2.6-omap-h63xx.git MTD: OMAP2-NAND: Fix partition reading from board info This patch fixes the omap2 nand driver code that allows reading of partition data from board info. The parse_mtd_partitions() function no longer returns a negative error in case cmdline is not passed. See commit: b0d06afb607 Signed-off-by: Nishant Kamat Signed-off-by: Tony Lindgren --- diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 3b7307c5f9f..85793a3a7b6 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -636,7 +636,7 @@ static int __devinit omap_nand_probe(struct platform_device *pdev) err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0); if (err > 0) add_mtd_partitions(&info->mtd, info->parts, err); - else if (err < 0 && pdata->parts) + else if (pdata->parts) add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts); else #endif