block/partitions/rk: fix panic when cmdline without mtdparts
Change-Id: I1a3b052ac671ce4abddaf941373f38c11193f0d4 Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
This commit is contained in:
parent
bcb12333ab
commit
b76c56efde
1 changed files with 4 additions and 1 deletions
|
|
@ -305,7 +305,10 @@ int rkpart_partition(struct parsed_partitions *state)
|
|||
return 0;
|
||||
|
||||
/* Fixme: parameter should be coherence with part table */
|
||||
cmdline = strstr(saved_command_line, "mtdparts=") + 9;
|
||||
cmdline = strstr(saved_command_line, "mtdparts=");
|
||||
if (!cmdline)
|
||||
return 0;
|
||||
cmdline += 9;
|
||||
cmdline_parsed = 0;
|
||||
|
||||
num_parts = parse_cmdline_partitions(n, &parts, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue