[MTD] cmdlinepart: Missing partition info is not an error

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Apr 22 14:59:01 EDT 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=b0d06afb60741c19e103ffd60927f68e17c9d199
Commit:     b0d06afb60741c19e103ffd60927f68e17c9d199
Parent:     c3f08b353519ee9c64308837199a9fcf83e863da
Author:     Peter Korsgaard <jacmet at sunsite.dk>
AuthorDate: Thu Feb 14 17:00:10 2008 +0100
Committer:  David Woodhouse <dwmw2 at infradead.org>
CommitDate: Tue Apr 22 19:10:15 2008 +0100

    [MTD] cmdlinepart: Missing partition info is not an error
    
    Return 0 partitions instead of -EINVAL on no mtdpart= argument in kernel
    cmdline or missing partition info for device.
    
    Signed-off-by: Peter Korsgaard <jacmet at sunsite.dk>
    Acked-by: Stefan Roese <sr at denx.de>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 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 3e09043..e472a0e 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -310,9 +310,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);
@@ -343,7 +340,7 @@ static int parse_cmdline_partitions(struct mtd_info *master,
 			return part->num_parts;
 		}
 	}
-	return -EINVAL;
+	return 0;
 }
 
 



More information about the linux-mtd-cvs mailing list