mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-29 08:00:26 +09:00
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)
This commit is contained in:
parent
4f414d392f
commit
73027a853d
@ -244,6 +244,12 @@ static struct device_node *__of_get_next_child(const struct device_node *node,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
next = prev ? prev->sibling : node->child;
|
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)
|
for (; next; next = next->sibling)
|
||||||
if (of_node_get(next))
|
if (of_node_get(next))
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user