mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
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)
This commit is contained in:
parent
9672515319
commit
72c98ed1ab
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue