diff options
author | Gary King <gking@nvidia.com> | 2010-06-28 15:00:10 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 00:46:54 -0700 |
commit | 4ddb03efadaad24ce5748c463ee77774465c9460 (patch) | |
tree | d49725a21eed22032d412340da86fee00647ff0e /drivers/mtd | |
parent | 5a57643078a1caa0fe38ebf860c3634037d9a200 (diff) |
mtd/tegra_nand: don't ignore return value for add_mtd_partitions
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>
Rebase-Id: R62bc218fcdd9c5e54a6329fe75275e7df816691f
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/tegra_nand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/tegra_nand.c b/drivers/mtd/devices/tegra_nand.c index 452a73853b19..9b2e18a6328b 100644 --- a/drivers/mtd/devices/tegra_nand.c +++ b/drivers/mtd/devices/tegra_nand.c @@ -1517,7 +1517,7 @@ tegra_nand_probe(struct platform_device *pdev) #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 |