arm: mvebu: turris_omnia: Do not fail in fixup_mtd_partitions when partitions do not exist
All partitions are created by fixup_mtd_partitions() function, so they do
not have to exist just for their removal need.
Fixes: 92f36c8e74 ("arm: mvebu: turris_omnia: fixup MTD partitions in Linux' DTB")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Marek Behún <kabel@kernel.org>
This commit is contained in:
@@ -974,11 +974,10 @@ static bool fixup_mtd_partitions(void *blob, int offset, struct mtd_info *mtd)
|
||||
int parts;
|
||||
|
||||
parts = fdt_subnode_offset(blob, offset, "partitions");
|
||||
if (parts < 0)
|
||||
return false;
|
||||
|
||||
if (fdt_del_node(blob, parts) < 0)
|
||||
return false;
|
||||
if (parts >= 0) {
|
||||
if (fdt_del_node(blob, parts) < 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
parts = fdt_add_subnode(blob, offset, "partitions");
|
||||
if (parts < 0)
|
||||
|
||||
Reference in New Issue
Block a user