diff options
author | Simon Glass <sjg@chromium.org> | 2019-07-20 21:23:39 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-07-29 18:38:05 +0300 |
commit | e44bc831e262c2ca7f307ad12074c2eb9adab615 (patch) | |
tree | 259efa981e7bfc507568c89533b7e52e9d86c030 /tools/dtoc/fdt.py | |
parent | 880e9ee650f829ed4772003633feb01ced94d227 (diff) | |
download | u-boot-e44bc831e262c2ca7f307ad12074c2eb9adab615.tar.xz |
dtoc: Update Fdt.GetNode() to handle the root node
This function currently fails if the root node is requested. Requesting
the root node is sometimes useful, so fix the bug.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/fdt.py')
-rw-r--r-- | tools/dtoc/fdt.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py index b341ef3f83..cd7673c7da 100644 --- a/tools/dtoc/fdt.py +++ b/tools/dtoc/fdt.py @@ -574,6 +574,8 @@ class Fdt: parts = path.split('/') if len(parts) < 2: return None + if len(parts) == 2 and parts[1] == '': + return node for part in parts[1:]: node = node.FindNode(part) if not node: |