mtd: ofpart: assign return argument exactly once
authorBrian Norris <computersforpeace@gmail.com>
Fri, 4 Dec 2015 23:25:13 +0000 (15:25 -0800)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 9 Dec 2015 18:21:52 +0000 (10:21 -0800)
commitc3168d26c8deea4cc0202bb19341ab55247c3941
tree77b4be29c215580f3fd5170d6b4f5f4023b27613
parent2027cba66a0591e65a64d3ecfe8a3aa2f55a681b
mtd: ofpart: assign return argument exactly once

It's easier to refactor these parsers if the return value gets assigned
only once, just like every other MTD partition parser.

This prepares for making the second arg to the parse_fn() const. This is
OK if we construct the partitions completely first, and assign them to
the return pointer only after we're done modifying them.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/ofpart.c