Skip to content

Commit b0d06af

Browse files
jacmetdwmw2
authored andcommitted
[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>
1 parent c3f08b3 commit b0d06af

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎drivers/mtd/cmdlinepart.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,6 @@ static int parse_cmdline_partitions(struct mtd_info *master,
310310
struct cmdline_mtd_partition *part;
311311
char *mtd_id = master->name;
312312

313-
if(!cmdline)
314-
return -EINVAL;
315-
316313
/* parse command line */
317314
if (!cmdline_parsed)
318315
mtdpart_setup_real(cmdline);
@@ -343,7 +340,7 @@ static int parse_cmdline_partitions(struct mtd_info *master,
343340
return part->num_parts;
344341
}
345342
}
346-
return -EINVAL;
343+
return 0;
347344
}
348345

349346

0 commit comments

Comments
 (0)