diff options
author | Simon Glass <sjg@chromium.org> | 2017-06-07 10:28:42 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-06-12 08:38:08 -0400 |
commit | 9f95267271c0b6cff64c5ac1b308e1e0281e9e3a (patch) | |
tree | f8cf335e7d18adc330bc388520c22284c492f74a /cmd | |
parent | 72c98ed1ab48dbd2f3129160413dcc10565aae0c (diff) | |
download | u-boot-9f95267271c0b6cff64c5ac1b308e1e0281e9e3a.zip u-boot-9f95267271c0b6cff64c5ac1b308e1e0281e9e3a.tar.gz u-boot-9f95267271c0b6cff64c5ac1b308e1e0281e9e3a.tar.bz2 |
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')
-rw-r--r-- | cmd/fdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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"); |