[PATCH 1/2] arm: mvebu: turris_omnia: Do not fail in fixup_mtd_partitions when partitions do not exist
Stefan Roese
sr at denx.de
Tue Aug 9 13:32:30 CEST 2022
On 01.08.22 12:02, Pali Rohár wrote:
> All partitions are created by fixup_mtd_partitions() function, so they do
> not have to exist just for their removal need.
>
> Fixes: 92f36c8e74c1 ("arm: mvebu: turris_omnia: fixup MTD partitions in Linux' DTB")
> Signed-off-by: Pali Rohár <pali at kernel.org>
Applied to u-boot-marvell/master
Thanks,
Stefan
> ---
> board/CZ.NIC/turris_omnia/turris_omnia.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
> index e262ea1aba51..d836ac94ec29 100644
> --- a/board/CZ.NIC/turris_omnia/turris_omnia.c
> +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
> @@ -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)
Viele Grüße,
Stefan Roese
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de
More information about the U-Boot
mailing list