summaryrefslogtreecommitdiff
path: root/cmd/fdt.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-06-07 10:28:41 -0600
committerTom Rini <trini@konsulko.com>2017-06-12 08:38:08 -0400
commit72c98ed1ab48dbd2f3129160413dcc10565aae0c (patch)
tree1d7101f068c8b0aac00cbdacf59464c00cbc9101 /cmd/fdt.c
parent96725153197f32e00a07d0fe1bfbab8662d94cb9 (diff)
downloadu-boot-72c98ed1ab48dbd2f3129160413dcc10565aae0c.tar.gz
fdt: Add a check to do_fdt() for coverity
We know that fdt_getprop() does not return NULL when len is > 0 but coverity does not. Add an extra check to keep it happy. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163249) Fixes: bc80295b (fdt: Add get commands to fdt)
Diffstat (limited to 'cmd/fdt.c')
-rw-r--r--cmd/fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/fdt.c b/cmd/fdt.c
index e55102a18d..dc0052040a 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -380,7 +380,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* no property value */
setenv(var, "");
return 0;
- } else if (len > 0) {
+ } else if (nodep && len > 0) {
if (subcmd[0] == 'v') {
int ret;