Commit e25e0a4d authored by Christopher Cordahi's avatar Christopher Cordahi Committed by Artem Bityutskiy

mtd: cmdlinepart: fix skipping zero sized partition

Decrement index i after skipping a zero sized partition.  On next loop
iteration, the index will be the same as before, but the data will be
new as it was moved when earlier partition was skipped.
Signed-off-by: default avatarChristopher Cordahi <christophercordahi@nanometrics.ca>
Acked-by: default avatarShmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent b23b746c
......@@ -337,6 +337,7 @@ static int parse_cmdline_partitions(struct mtd_info *master,
part->num_parts--;
memmove(&part->parts[i], &part->parts[i + 1],
sizeof(*part->parts) * (part->num_parts - i));
i--;
continue;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment