summaryrefslogtreecommitdiff
path: root/scripts/dtc/checks.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-19 15:15:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-19 15:15:07 -0700
commit31e182363b39d84031eadf0caf6d99fd9eb056f0 (patch)
tree82dfe8293c9880ad521f67f3afc20a2fe55efddd /scripts/dtc/checks.c
parent1200b6809dfd9d73bc4c7db76d288c35fa4b2ebe (diff)
parent5027e19db8cee24e189f8afa53b548e1ac5d0c1d (diff)
Merge tag 'devicetree-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree updates from Rob Herring: - new tool 'dtx_diff' to diff DT files - sync kernel's dtc/libfdt to current dtc repo master - fix for reserved memory regions located in highmem - document standard unit suffixes for DT properties - various DT binding doc updates * tag 'devicetree-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: Add vendor prefix for eGalax_eMPIA Technology Inc Input: ads7846: Add description how to use internal reference (ADS7846) ARM: realview: add EB syscon variants to bindings devicetree: bindings: ARM: Use "uV" for micro-volt serial: fsl-imx-uart: Fix typo in fsl,dte-mode description of: add 'const' for of_property_*_string*() parameter '*np' of/unittest: fix infinite loop in of_unittest_destroy_tracked_overlays() of: alloc anywhere from memblock if range not specified kbuild: Allow using host dtc instead of kernel's copy of: resolver: Add missing of_node_get and of_node_put of: Add United Radiant Technology Corporation vendor prefix dt/bindings: add documentation on standard property unit suffixes scripts/dtc: Update to upstream commit b06e55c88b9b ARM: boot: Add an implementation of strnlen for libfdt scripts/dtc: dtx_diff - add info to error message dtc: create tool to diff device trees
Diffstat (limited to 'scripts/dtc/checks.c')
-rw-r--r--scripts/dtc/checks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c
index e81a8c74b8d2..0c03ac9159c1 100644
--- a/scripts/dtc/checks.c
+++ b/scripts/dtc/checks.c
@@ -560,7 +560,7 @@ static void check_reg_format(struct check *c, struct node *dt,
size_cells = node_size_cells(node->parent);
entrylen = (addr_cells + size_cells) * sizeof(cell_t);
- if ((prop->val.len % entrylen) != 0)
+ if (!entrylen || (prop->val.len % entrylen) != 0)
FAIL(c, "\"reg\" property in %s has invalid length (%d bytes) "
"(#address-cells == %d, #size-cells == %d)",
node->fullpath, prop->val.len, addr_cells, size_cells);