summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2019-07-03 21:20:15 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2019-07-03 21:20:15 +0000
commit834bac05cbe00aafbdb50537f181965d4e2a43dc (patch)
tree0d1de8ccd5ac68c789d0095831656393aff2f653 /sys
parenta1ef113bcca9bad0272aec4f4219d272817e8cee (diff)
OF_finddevice(9) returns -1 if the node in question couldn't be found.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ofw/ofw_thermal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ofw/ofw_thermal.c b/sys/dev/ofw/ofw_thermal.c
index 171b11e1685..562866f7f36 100644
--- a/sys/dev/ofw/ofw_thermal.c
+++ b/sys/dev/ofw/ofw_thermal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofw_thermal.c,v 1.1 2019/07/02 20:12:11 kettenis Exp $ */
+/* $OpenBSD: ofw_thermal.c,v 1.2 2019/07/03 21:20:14 kettenis Exp $ */
/*
* Copyright (c) 2019 Mark Kettenis
*
@@ -434,7 +434,7 @@ thermal_init(void)
{
int node = OF_finddevice("/thermal-zones");
- if (node == 0)
+ if (node == -1)
return;
tztq = taskq_create("tztq", 1, IPL_NONE, 0);