[MTD] [MAPS] Fix cmdlineparse handling in mapping files
authorKyungmin Park <kyungmin.park@samsung.com>
Wed, 7 May 2008 02:54:10 +0000 (11:54 +0900)
committerDavid Woodhouse <dwmw2@infradead.org>
Thu, 5 Jun 2008 06:51:13 +0000 (07:51 +0100)
Now it returns the 0 if cmdlineparse not supplied.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/maps/omap_nor.c
drivers/mtd/onenand/generic.c

index 240b0e2d095d6bade93555986d0cd09cc163aa80..c12d8056bebd123c792978f62749dd1a3eb4356d 100644 (file)
@@ -110,7 +110,7 @@ static int __init omapflash_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 (err <= 0 && pdata->parts)
                add_mtd_partitions(info->mtd, pdata->parts, pdata->nr_parts);
        else
 #endif
index 3d44d040a47def9bb00a7fea1b561135d8f84aa9..ad81ab8e95e2ca5f3d9cdea4e2b50472c282e202 100644 (file)
@@ -76,7 +76,7 @@ static int __devinit generic_onenand_probe(struct device *dev)
        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 (err <= 0 && pdata->parts)
                add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts);
        else
 #endif