]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit54be5468a38159754ac40c51ac49838bc5b78c7d
tree77b4be29c215580f3fd5170d6b4f5f4023b27613
parentdb99a384c20684c4b96f6d9c11345f493657a73c
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