Skip to content
Permalink
Browse files

scripts/dts/edtlib.py: error check # and -map properties

Move when we early out for properties that start with # like
"#address-cells" or end with -map like "interrupt-map" to after we do
some error checking.  This allows us to check those properties at least
exist if they are required.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information...
galak committed Aug 9, 2019
1 parent 61e4b06 commit 5dd715b9c11ad23d5c4a47da1ed4251824aba649
Showing with 5 additions and 5 deletions.
  1. +5 −5 scripts/dts/edtlib.py
@@ -526,11 +526,6 @@ def _init_props(self):
def _init_prop(self, name, options):
# _init_props() helper for initializing a single property

# Skip properties that start with '#', like '#size-cells', and mapping
# properties like 'gpio-map'/'interrupt-map'
if name[0] == "#" or name.endswith("-map"):
return

prop_type = options.get("type")
if not prop_type:
_err("'{}' in {} lacks 'type'".format(name, self.binding_path))
@@ -548,6 +543,11 @@ def _init_prop(self, name, options):
# 'category: optional' property that wasn't there
return

# Skip properties that start with '#', like '#size-cells', and mapping
# properties like 'gpio-map'/'interrupt-map'
if name[0] == "#" or name.endswith("-map"):
return

prop = Property()
prop.dev = self
prop.name = name

0 comments on commit 5dd715b

Please sign in to comment.
You can’t perform that action at this time.