OF_peer() in IEEE 1275 returns 0 if no peer exists, not -1.

This commit is contained in:
Nathan Whitehorn 2014-05-11 18:22:05 +00:00
parent c8f780e3d6
commit e2fc1af45e

View File

@ -187,7 +187,7 @@ ofwbus_identify(driver_t *driver, device_t parent)
{
/* Check if Open Firmware has been instantiated */
if (OF_peer(0) == -1)
if (OF_peer(0) == 0)
return;
if (device_find_child(parent, "ofwbus", -1) == NULL)