aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/mtdpart.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index d518e4db8a0b..f8c08ec65feb 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -711,6 +711,8 @@ static const char *default_mtd_part_types[] = {
711 * partition parsers, specified in @types. However, if @types is %NULL, then 711 * partition parsers, specified in @types. However, if @types is %NULL, then
712 * the default list of parsers is used. The default list contains only the 712 * the default list of parsers is used. The default list contains only the
713 * "cmdlinepart" and "ofpart" parsers ATM. 713 * "cmdlinepart" and "ofpart" parsers ATM.
714 * Note: If there are more then one parser in @types, the kernel only takes the
715 * partitions parsed out by the first parser.
714 * 716 *
715 * This function may return: 717 * This function may return:
716 * o a negative error code in case of failure 718 * o a negative error code in case of failure
@@ -735,11 +737,12 @@ int parse_mtd_partitions(struct mtd_info *master, const char **types,
735 if (!parser) 737 if (!parser)
736 continue; 738 continue;
737 ret = (*parser->parse_fn)(master, pparts, data); 739 ret = (*parser->parse_fn)(master, pparts, data);
740 put_partition_parser(parser);
738 if (ret > 0) { 741 if (ret > 0) {
739 printk(KERN_NOTICE "%d %s partitions found on MTD device %s\n", 742 printk(KERN_NOTICE "%d %s partitions found on MTD device %s\n",
740 ret, parser->name, master->name); 743 ret, parser->name, master->name);
744 break;
741 } 745 }
742 put_partition_parser(parser);
743 } 746 }
744 return ret; 747 return ret;
745} 748}