From 7cc1d55f9704a9df1053aefd21fd5db98ac4c983 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Thu, 14 Feb 2008 13:46:13 +0100 Subject: [PATCH] cmdlinepart: Missing partition info is not an error Return 0 partitions instead of -EINVAL on no mtdpart= argument on kernel cmdline or missing partition info for device. Signed-off-by: Peter Korsgaard --- drivers/mtd/cmdlinepart.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c index b44292a..08b82c9 100644 --- a/drivers/mtd/cmdlinepart.c +++ b/drivers/mtd/cmdlinepart.c @@ -308,9 +308,6 @@ static int parse_cmdline_partitions(struct mtd_info *master, struct cmdline_mtd_partition *part; char *mtd_id = master->name; - if(!cmdline) - return -EINVAL; - /* parse command line */ if (!cmdline_parsed) mtdpart_setup_real(cmdline); @@ -341,7 +338,7 @@ static int parse_cmdline_partitions(struct mtd_info *master, return part->num_parts; } } - return -EINVAL; + return 0; } -- 1.5.4.1