Fix error value returned by ofw_bus_gen_get_node().

By definition ofw_bus_get_node() should  consistently return -1 when there
is no associated OF node.

MFC after:	4 weeks
Discussed with:	nwhitehorn
Analyzed in: 	https://reviews.freebsd.org/D30761
This commit is contained in:
Michal Meloun 2021-06-24 11:56:20 +02:00
parent e6caac717b
commit 3eae4e106a

View File

@ -144,7 +144,7 @@ ofw_bus_gen_get_node(device_t bus, device_t dev)
obd = OFW_BUS_GET_DEVINFO(bus, dev);
if (obd == NULL)
return (0);
return ((phandle_t)-1);
return (obd->obd_node);
}