Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
		}