All of lore.kernel.org
 help / color / mirror / Atom feed
From: megous at megous.com <megous@megous.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] lib: decode_timing_property should return -NOENT when proprty is not found
Date: Sat,  9 Feb 2019 14:39:56 +0100	[thread overview]
Message-ID: <20190209133957.12713-4-megous@megous.com> (raw)
In-Reply-To: <20190209133957.12713-1-megous@megous.com>

From: Ondrej Jirman <megous@megous.com>

Length may be unitialized when fdt_getprop fails.

Signed-off-by: Ondřej Jirman <megous@megous.com>
---
 lib/fdtdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 18663ce6bd..3510de78e1 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)) {
-- 
2.20.1

  parent reply	other threads:[~2019-02-09 13:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-09 13:39 [U-Boot] [PATCH 0/4] Random small sunxi fixes megous at megous.com
2019-02-09 13:39 ` [U-Boot] [PATCH 1/4] sunxi: Fix build when CONFIG_CMD_NET is disabled megous at megous.com
2019-02-11 12:14   ` Tomas Novotny
2019-02-11 12:41     ` Ondřej Jirman
2019-02-09 13:39 ` [U-Boot] [PATCH 2/4] sunxi: Fix build when CONFIG_CMD_PXE or CONFIG_CMD_DHCP are disabled megous at megous.com
2019-02-13 17:01   ` Jagan Teki
2019-02-09 13:39 ` megous at megous.com [this message]
2019-02-19 15:17   ` [U-Boot] [PATCH 3/4] lib: decode_timing_property should return -NOENT when proprty is not found Simon Glass
2019-02-19 21:43     ` Ondřej Jirman
2019-02-09 13:39 ` [U-Boot] [PATCH 4/4] power: axp818: Fix typo in axp_set_dldo megous at megous.com
2019-02-13 17:01   ` Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190209133957.12713-4-megous@megous.com \
    --to=megous@megous.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.