diff options
author | Christopher Cordahi <christophercordahi@nanometrics.ca> | 2012-12-17 01:59:29 +0100 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-02-04 08:26:28 +0100 |
commit | e25e0a4de1237972a86e5831c8659c4068ff23f7 (patch) | |
tree | f2f07d4013b65a9c7b7a085bfcfa81c4d853d83f /drivers/mtd/cmdlinepart.c | |
parent | mtd: gpmi: Always report ECC stats and return max_bitflips (diff) | |
download | linux-e25e0a4de1237972a86e5831c8659c4068ff23f7.tar.xz linux-e25e0a4de1237972a86e5831c8659c4068ff23f7.zip |
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: Christopher Cordahi <christophercordahi@nanometrics.ca>
Acked-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/cmdlinepart.c')
-rw-r--r-- | drivers/mtd/cmdlinepart.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c index c533f27d863f..c1efb4c1d3d2 100644 --- a/drivers/mtd/cmdlinepart.c +++ b/drivers/mtd/cmdlinepart.c @@ -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; } |