when the mtd partition command line format is used, ignoring the
return value left err set to the number of partitions, which was
later interpreted as an error return code for tegra_nand_probe,
which caused the MTD master to be unregistered (ultimately causing
NULL pointer derefs when mounting the root partition).
Change-Id: Icebfb295810554617c56deeafc91bc22cc43bb35
Signed-off-by: Gary King <gking@nvidia.com>
#ifdef CONFIG_MTD_PARTITIONS
err = parse_mtd_partitions(mtd, part_probes, &info->parts, 0);
if (err > 0) {
- add_mtd_partitions(mtd, info->parts, err);
+ err = add_mtd_partitions(mtd, info->parts, err);
} else if (err <= 0 && plat->parts) {
err = add_mtd_partitions(mtd, plat->parts, plat->nr_parts);
} else