summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-06-28 14:01:30 -0700
committerGary King <gking@nvidia.com>2010-06-28 15:11:16 -0700
commit5a3885d5b0d35960f7268faf47e4b984417aa726 (patch)
treef31de97e71c6dc59ef8d25bdde6f1d7dc45cfe47 /drivers
parent83157cc2e60c892ebe3933e2d14d1ef296ffc530 (diff)
tegra_mtd: 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). this fix allows bootloaders to use the standard mtdparts= syntax for specifying partitions, rather than the tegrapart= syntax Change-Id: Ia50a2ebe72efb213f3dd418510f01d59ad178d31 Reviewed-on: http://git-master/r/3276 Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/devices/tegra_mtd_nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/tegra_mtd_nand.c b/drivers/mtd/devices/tegra_mtd_nand.c
index 846ea7cef637..8ef254bc7802 100644
--- a/drivers/mtd/devices/tegra_mtd_nand.c
+++ b/drivers/mtd/devices/tegra_mtd_nand.c
@@ -750,7 +750,7 @@ static int __devinit tegra_nand_probe(struct platform_device *pdev)
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 && plat->nr_parts) {
err = add_mtd_partitions(mtd, plat->parts, plat->nr_parts);
} else