From b3e668feb7ba45a5058d8c97436b0c8b7a4c1368 Mon Sep 17 00:00:00 2001 From: Nishant Kamat Date: Thu, 3 Jul 2008 04:18:39 -0500 Subject: [PATCH] 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 --- drivers/mtd/nand/omap2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.41.1