From 2fda5ece3c6b3326c64147ac2ca033e17bdb4c07 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Mon, 2 Jul 2018 08:18:04 +0200 Subject: [PATCH] lib: decode_timing_property should return -NOENT when proprty is not found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Length may be unitialized when fdt_getprop fails. Signed-off-by: Ondřej Jirman --- lib/fdtdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 18663ce6bda..3510de78e13 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -980,7 +980,7 @@ static int decode_timing_property(const void *blob, int node, const char *name, if (!prop) { debug("%s: could not find property %s\n", fdt_get_name(blob, node, NULL), name); - return length; + return -ENOENT; } if (length == sizeof(u32)) {