@@ -743,7 +743,6 @@ static const char * const default_mtd_part_types[] = {
* partitions parsed out by the first parser.
*
* This function may return:
- * o a negative error code in case of failure
* o zero if no partitions were found
* o a positive number of found partitions, in which case on exit @pparts will
* point to an array containing this number of &struct mtd_info objects.
@@ -773,10 +772,10 @@ int parse_mtd_partitions(struct mtd_info *master, const char *const *types,
if (ret > 0) {
printk(KERN_NOTICE "%d %s partitions found on MTD device %s\n",
ret, parser->name, master->name);
- break;
+ return ret;
}
}
- return ret;
+ return 0;
}
int mtd_is_partition(const struct mtd_info *mtd)
Due to wrong assumption in ofpart ofpart fails on Exynos on SPI chips with no partitions because the subnode containing controller data confuses the ofpart parser. Thus compiling in ofpart support automatically fails probing any SPI NOR flash without partitions on Exynos. Compiling in a partitioning scheme should not cause probe of otherwise valid device to fail. Remove that failure possibility. Signed-off-by: Michal Suchanek <hramrach@gmail.com> --- drivers/mtd/mtdpart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)