Skip to content

Commit 2b322bc

Browse files
committed
dtoverlay: Fix node_is_enabled for implicit status
The absence of a status property implies that a node is enabled. Update dtoverlay_node_is_enabled to match that behaviour. Signed-off-by: Phil Elwell <[email protected]>
1 parent 0401e0a commit 2b322bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dtmerge/dtoverlay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3086,7 +3086,7 @@ int dtoverlay_node_is_enabled(DTBLOB_T *dtb, int pos)
30863086
if (pos >= 0)
30873087
{
30883088
const void *prop = dtoverlay_get_property(dtb, pos, "status", NULL);
3089-
if (prop &&
3089+
if (!prop ||
30903090
((strcmp((const char *)prop, "okay") == 0) ||
30913091
(strcmp((const char *)prop, "ok") == 0)))
30923092
return 1;

0 commit comments

Comments
 (0)