summaryrefslogtreecommitdiff
path: root/scripts/dtc/libfdt
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2016-03-04 17:56:58 +0300
committerRob Herring <robh@kernel.org>2016-03-29 21:29:22 +0300
commitb993734718c0106418e068f21c7be01afc12306c (patch)
tree8b098809bcc9edb85d0e76c52c1abebd8100440f /scripts/dtc/libfdt
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff)
downloadlinux-b993734718c0106418e068f21c7be01afc12306c.tar.xz
scripts/dtc: Update to upstream version 53bf130b1cdd
Sync to upstream dtc commit 53bf130b1cdd ("libfdt: simplify fdt_node_check_compatible()"). This adds the following commits from upstream: 53bf130 libfdt: simplify fdt_node_check_compatible() c9d9121 Warn on node name unit-address presence/absence mismatch 2e53f9d Catch unsigned 32bit overflow when parsing flattened device tree offsets Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'scripts/dtc/libfdt')
-rw-r--r--scripts/dtc/libfdt/fdt_ro.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/dtc/libfdt/fdt_ro.c b/scripts/dtc/libfdt/fdt_ro.c
index e5b313682007..50cce864283c 100644
--- a/scripts/dtc/libfdt/fdt_ro.c
+++ b/scripts/dtc/libfdt/fdt_ro.c
@@ -647,10 +647,8 @@ int fdt_node_check_compatible(const void *fdt, int nodeoffset,
prop = fdt_getprop(fdt, nodeoffset, "compatible", &len);
if (!prop)
return len;
- if (fdt_stringlist_contains(prop, len, compatible))
- return 0;
- else
- return 1;
+
+ return !fdt_stringlist_contains(prop, len, compatible);
}
int fdt_node_offset_by_compatible(const void *fdt, int startoffset,