Home
last modified time | relevance | path

Searched hist:"99 bb38e2cce9d99238458e0f6d1880c6d2e80a4d" (Results 1 – 1 of 1) sorted by relevance

/rk3399_rockchip-uboot/cmd/
H A Dfdt.ccee8c35d1b7101d09a1854a48f867deaa701f7bf Fri Aug 18 12:41:14 UTC 2017 Hannes Schmelzer <oe5hpm@oevsv.at> fdt: fix 'prop (...) not found!' error in 'fdt set' command

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@oevsv.at>
Acked-by: Simon Glass <sjg@chromium.org>
99bb38e2cce9d99238458e0f6d1880c6d2e80a4d Tue Jun 13 11:10:35 UTC 2017 Tom Rini <trini@konsulko.com> fdt: Check for NULL return from fdt_getprop in 'fdt set'

While the previous pass through fixed one place where we knew that
fdt_getprop would be given a positive len, in the case of 'fdt set' we
do not, so check that we did no get NULL from fdt_getprop().

Cc: Simon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 163249)
Fixes 72c98ed1ab48 ("fdt: Add a check to do_fdt() for coverity")
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>