Skip to content

Commit

Permalink
[MTD] [MAPS] Fix cmdlineparse handling in mapping files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kyungmin Park authored and David Woodhouse committed Jun 5, 2008
1 parent 9b62d86 commit ba75321
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/mtd/maps/omap_nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/onenand/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba75321

Please sign in to comment.