|
@@ -163,9 +163,11 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
|
|
|
ret = parse_mtd_partitions(&fun->mtd, part_types, &fun->parts, 0);
|
|
|
|
|
|
#ifdef CONFIG_MTD_OF_PARTS
|
|
|
- if (ret == 0)
|
|
|
- ret = of_mtd_parse_partitions(fun->dev, &fun->mtd,
|
|
|
- flash_np, &fun->parts);
|
|
|
+ if (ret == 0) {
|
|
|
+ ret = of_mtd_parse_partitions(fun->dev, flash_np, &fun->parts);
|
|
|
+ if (ret < 0)
|
|
|
+ goto err;
|
|
|
+ }
|
|
|
#endif
|
|
|
if (ret > 0)
|
|
|
ret = add_mtd_partitions(&fun->mtd, fun->parts, ret);
|