mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
[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@sunsite.dk> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
parent
c3f08b3535
commit
b0d06afb60
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user