Skip to content
Commit 2c77c57d authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Boris Brezillon
Browse files

mtd: move code adding master MTD out of mtd_add_device_partitions()



This change is a small cleanup of mtd_device_parse_register(). When
using MTD_PARTITIONED_MASTER it makes sure a master MTD is registered
before dealing with partitions. The advantage of this is not mixing
code handling master MTD with code handling partitions.

This commit doesn't change any behavior except from a slightly different
failure code path. The new code may need to call del_mtd_device when
something goes wrong.

Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
parent e6e620f0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment