diff options
| author | Rob Herring <robh@kernel.org> | 2016-03-04 08:56:58 -0600 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@google.com> | 2018-02-05 08:58:36 -0800 |
| commit | 4d8ea865394ee408d2c5e5c8e317fd952dc0e46f (patch) | |
| tree | 63dae4bde46ee19397f99acaf55f98176e684e03 /scripts/dtc/libfdt/fdt_ro.c | |
| parent | 8b8ef6794bdba4b5805596c0933bfa0be224b457 (diff) | |
UPSTREAM: 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>
(cherry picked from commit b993734718c0106418e068f21c7be01afc12306c)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'scripts/dtc/libfdt/fdt_ro.c')
| -rw-r--r-- | scripts/dtc/libfdt/fdt_ro.c | 6 |
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, |
