diff options
author | Simon Glass <sjg@chromium.org> | 2017-06-07 10:28:45 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-06-12 08:38:10 -0400 |
commit | 73027a853d2d9324ef2b15d5a860da3e3126321d (patch) | |
tree | 184810055f4e7993abaad8249e8dff9739c5920b /drivers | |
parent | 4f414d392fb5d7c4ac547c4ee9f02b81648c00dd (diff) | |
download | u-boot-73027a853d2d9324ef2b15d5a860da3e3126321d.zip u-boot-73027a853d2d9324ef2b15d5a860da3e3126321d.tar.gz u-boot-73027a853d2d9324ef2b15d5a860da3e3126321d.tar.bz2 |
dm: core: Supress dead-code warning in __of_get_next_child()
Suppress a warning on next = next->sibling.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 163245)
Fixes 644ec0a (dm: core: Add livetree access functions)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/core/of_access.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c index 94ef3cc..93a6560 100644 --- a/drivers/core/of_access.c +++ b/drivers/core/of_access.c @@ -244,6 +244,12 @@ static struct device_node *__of_get_next_child(const struct device_node *node, return NULL; next = prev ? prev->sibling : node->child; + /* + * coverity[dead_error_line : FALSE] + * Dead code here since our current implementation of of_node_get() + * always returns NULL (Coverity CID 163245). But we leave it as is + * since we may want to implement get/put later. + */ for (; next; next = next->sibling) if (of_node_get(next)) break; |