summaryrefslogtreecommitdiff
path: root/cmd/fdt.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-06-07 16:28:42 (GMT)
committerTom Rini <trini@konsulko.com>2017-06-12 12:38:08 (GMT)
commit9f95267271c0b6cff64c5ac1b308e1e0281e9e3a (patch)
treef8cf335e7d18adc330bc388520c22284c492f74a /cmd/fdt.c
parent72c98ed1ab48dbd2f3129160413dcc10565aae0c (diff)
downloadu-boot-fsl-qoriq-9f95267271c0b6cff64c5ac1b308e1e0281e9e3a.tar.xz
fdt: Add a check to fdt_print() 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: 163248)
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 dc00520..31a5361 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -975,7 +975,7 @@ static int fdt_print(const char *pathp, char *prop, int depth)
/* no property value */
printf("%s %s\n", pathp, prop);
return 0;
- } else if (len > 0) {
+ } else if (nodep && len > 0) {
printf("%s = ", prop);
print_data (nodep, len);
printf("\n");