projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72c98ed
)
fdt: Add a check to fdt_print() for coverity
author
Simon Glass
<sjg@chromium.org>
Wed, 7 Jun 2017 16:28:42 +0000
(10:28 -0600)
committer
Tom Rini
<trini@konsulko.com>
Mon, 12 Jun 2017 12:38:08 +0000
(08:38 -0400)
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)
cmd/fdt.c
patch
|
blob
|
history
diff --git
a/cmd/fdt.c
b/cmd/fdt.c
index dc0052040ab9f83c60b56a266775435b61ed8943..31a536198c8e7c3249ab2c7f5441111aae41dd94 100644
(file)
--- 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");