summaryrefslogtreecommitdiffstats
path: root/sys/dev/pcf
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2012-03-15 22:53:39 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2012-03-15 22:53:39 +0000
commit6a20b9d5e1b5cb14c03717b65c2e6acd19edb28a (patch)
tree766b9307623f628b6d7593bdc335d1907b8da19e /sys/dev/pcf
parent9a147d4aa9b88d194fb4b58c42c7ec7c140b44a8 (diff)
downloadFreeBSD-src-6a20b9d5e1b5cb14c03717b65c2e6acd19edb28a.zip
FreeBSD-src-6a20b9d5e1b5cb14c03717b65c2e6acd19edb28a.tar.gz
Make ofw_bus_get_node() consistently return -1 when there is no associated
OF node, instead of a random mixture of 0 and -1. Update all checks for 0 to check for -1 instead. MFC after: 4 weeks
Diffstat (limited to 'sys/dev/pcf')
-rw-r--r--sys/dev/pcf/pcf_ebus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pcf/pcf_ebus.c b/sys/dev/pcf/pcf_ebus.c
index d354d9a..b3a2737 100644
--- a/sys/dev/pcf/pcf_ebus.c
+++ b/sys/dev/pcf/pcf_ebus.c
@@ -147,7 +147,7 @@ pcf_ebus_attach(device_t dev)
mtx_init(&sc->pcf_lock, device_get_nameunit(dev), "pcf", MTX_DEF);
/* get OFW node of the pcf */
- if ((node = ofw_bus_get_node(dev)) <= 0) {
+ if ((node = ofw_bus_get_node(dev)) == -1) {
device_printf(dev, "cannot get OFW node\n");
goto error;
}
OpenPOWER on IntegriCloud