summaryrefslogtreecommitdiff
path: root/sys/dev/ofw
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2021-01-24 16:23:05 +0000
committerthorpej <thorpej@NetBSD.org>2021-01-24 16:23:05 +0000
commitc8782dbeaaa84eea4aea1c142c2ce34192de0c84 (patch)
treeb36b1303285bd46b79e8cf8682d8a209f896eb05 /sys/dev/ofw
parent9bd6b4f38a296dfc3eb9feaf8c6d23a0081f27ea (diff)
Change of_search_compable() to return NULL on no-match, which is much more
sensible than the previous behavior. As such, back out rev 1.7 of sunxi_sramc.c. All other of_search_compable() call sites have been audited.
Diffstat (limited to 'sys/dev/ofw')
-rw-r--r--sys/dev/ofw/ofw_subr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ofw/ofw_subr.c b/sys/dev/ofw/ofw_subr.c
index f74b7129ca6..245f8c7b216 100644
--- a/sys/dev/ofw/ofw_subr.c
+++ b/sys/dev/ofw/ofw_subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_subr.c,v 1.43 2021/01/20 00:41:15 jmcneill Exp $ */
+/* $NetBSD: ofw_subr.c,v 1.44 2021/01/24 16:23:05 thorpej Exp $ */
/*
* Copyright 1998
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.43 2021/01/20 00:41:15 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.44 2021/01/24 16:23:05 thorpej Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -253,9 +253,9 @@ of_search_compatible(int phandle,
for (; compat_data->compat != NULL; compat_data++) {
const char *compat[] = { compat_data->compat, NULL };
if (of_match_compatible(phandle, compat))
- break;
+ return compat_data;
}
- return compat_data;
+ return NULL;
}
/*