The branch main has been updated by jrtc27:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e1060f6dfd80b34cab6d439bf7420ad686ddc8f1

commit e1060f6dfd80b34cab6d439bf7420ad686ddc8f1
Author:     Jessica Clarke <jrt...@freebsd.org>
AuthorDate: 2024-12-17 20:51:56 +0000
Commit:     Jessica Clarke <jrt...@freebsd.org>
CommitDate: 2024-12-17 20:51:56 +0000

    ofw: Fix inverted bcmp in ofw_bus_node_status_okay
    
    Otherwise this matches any two-character status except for ok.
    
    Fixes:          e5e94d2de987 ("Expand OpenFirmware API with 
ofw_bus_node_status_okay method")
    MFC after:      1 week
---
 sys/dev/ofw/ofw_bus_subr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/ofw/ofw_bus_subr.c b/sys/dev/ofw/ofw_bus_subr.c
index a6d562cd8e9d..4d0479dfb957 100644
--- a/sys/dev/ofw/ofw_bus_subr.c
+++ b/sys/dev/ofw/ofw_bus_subr.c
@@ -210,7 +210,7 @@ ofw_bus_node_status_okay(phandle_t node)
 
        OF_getprop(node, "status", status, OFW_STATUS_LEN);
        if ((len == 5 && (bcmp(status, "okay", len) == 0)) ||
-           (len == 3 && (bcmp(status, "ok", len))))
+           (len == 3 && (bcmp(status, "ok", len) == 0)))
                return (1);
 
        return (0);

Reply via email to