diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-03-27 22:35:41 +0200 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-05-07 10:10:47 +0200 |
commit | 5ac67ce36cfe38b4c104a42ce52c5c8d526f1c95 (patch) | |
tree | 35f4c6c21fb1024b5352907d48e50df0b8129705 /drivers/mtd/bcm47xxpart.c | |
parent | 0fe3ede7941dfcd6fd540fc2b086453d3ee8f236 (diff) |
mtd: move code adding (registering) partitions to the parse_mtd_partitions()
This commit slightly simplifies the code. Every parse_mtd_partitions()
caller (out of two existing ones) had to add partitions & cleanup parser
on its own. This moves that responsibility into the function.
That change also allows dropping struct mtd_partitions argument.
There is one minor behavior change caused by this cleanup. If
parse_mtd_partitions() fails to add partitions (add_mtd_partitions()
return an error) then mtd_device_parse_register() will still try to
add (register) fallback partitions. It's a real corner case affecting
one of uncommon error paths and shouldn't cause any harm.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/mtd/bcm47xxpart.c')
0 files changed, 0 insertions, 0 deletions