ofw: Fix inverted bcmp in ofw_bus_node_status_okay

Otherwise this matches any two-character status except for ok.

Fixes:		e5e94d2de9 ("Expand OpenFirmware API with ofw_bus_node_status_okay method")
MFC after:	1 week
This commit is contained in:
Jessica Clarke 2024-12-17 20:51:56 +00:00
parent f25d7ff303
commit e1060f6dfd

View file

@ -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);