[U-Boot] [PATCH] fdt: fix 'prop (...) not found!' error in 'fdt set' command

sjg at google.com sjg at google.com
Mon Sep 4 16:27:32 UTC 2017


On 18 August 2017 at 06:41, Hannes Schmelzer <oe5hpm at oevsv.at> wrote:
> This commit brings things back to the well known working state of the
> command.
> -
> With commit 9620d87259572ef21f0df60988d9a932ca673779
> (cmd/fdt: support single value replacement within an array)
>
> there was an error introduced modifying (inserting) a property to a
> device-tree node.
> fdt_getprop(...) returnes a len with -1 for a non-existing property, but
> a memcpy with len -1 isn't a good idea and things went wrong (crash).
> -
> Some times later Tom did repair this
> with commit 99bb38e2cce9d99238458e0f6d1880c6d2e80a4d
> (fdt: Check for NULL return from fdt_getprop in 'fdt set')
>
> This repairs the crash but the behaviour of the command isn't like
> before, it makes it impossible to insert a property.
> -
>
> Signed-off-by: Hannes Schmelzer <oe5hpm at oevsv.at>
>
> ---
>
>  cmd/fdt.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)

Acked-by: Simon Glass <sjg at chromium.org>

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list