[MTD] [MAPS] Fix cmdlineparse handling in mapping files
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>
This commit is contained in:
parent
9b62d86431
commit
ba75321193
|
@ -110,7 +110,7 @@ static int __init omapflash_probe(struct platform_device *pdev)
|
||||||
err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0);
|
err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0);
|
||||||
if (err > 0)
|
if (err > 0)
|
||||||
add_mtd_partitions(info->mtd, info->parts, err);
|
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);
|
add_mtd_partitions(info->mtd, pdata->parts, pdata->nr_parts);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -76,7 +76,7 @@ static int __devinit generic_onenand_probe(struct device *dev)
|
||||||
err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0);
|
err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0);
|
||||||
if (err > 0)
|
if (err > 0)
|
||||||
add_mtd_partitions(&info->mtd, info->parts, err);
|
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);
|
add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue