mtd: cmdlinepart: Simplify parse_cmdline_partitions
authorShmulik Ladkani <shmulik.ladkani@gmail.com>
Sun, 23 Sep 2012 07:52:29 +0000 (09:52 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 15 Nov 2012 13:37:45 +0000 (15:37 +0200)
Simply 'parse_cmdline_partitions': the outer loop iterating over
'partitions' is actually a search loop, it does not execute the inner
loop for each partition, only for the matched partition.

Let's break when search is successful, and move all inner code (relevant
only for the matched partition) outside of the outer loop.

Resulting code is much more readable, and makes the indent level sane.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

No differences found