]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - cmd/fdt.c
fdt: Add a check to do_fdt() for coverity
[people/ms/u-boot.git] / cmd / fdt.c
index e55102a18d93361236a3b89dba8ad0e28c778091..dc0052040ab9f83c60b56a266775435b61ed8943 100644 (file)
--- 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;