summaryrefslogtreecommitdiff
path: root/sys/modules
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2022-03-28 12:33:20 +0000
committerriastradh <riastradh@NetBSD.org>2022-03-28 12:33:20 +0000
commitad9f158865c014cbf7b944e84da320cd15c6a441 (patch)
tree9ea1555d3af729ad52b7051933f66dc3b21c7525 /sys/modules
parent68478a546548d97b8d1c10bb8affd59ea7d8c44c (diff)
driver(9): devsw_detach never fails. Make it return void.
Prune a whole lotta dead branches as a result of this. (Some logic calling this is also wrong for other reasons; devsw_detach is final -- you should never have any reason to decide to roll it back. To be cleaned up in subsequent commits...) XXX kernel ABI change to devsw_detach signature requires bump
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/examples/pollpal/pollpal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/modules/examples/pollpal/pollpal.c b/sys/modules/examples/pollpal/pollpal.c
index b76e0733699..868f91615de 100644
--- a/sys/modules/examples/pollpal/pollpal.c
+++ b/sys/modules/examples/pollpal/pollpal.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pollpal.c,v 1.3 2020/05/01 21:42:34 christos Exp $ */
+/* $NetBSD: pollpal.c,v 1.4 2022/03/28 12:33:22 riastradh Exp $ */
/*-
* Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pollpal.c,v 1.3 2020/05/01 21:42:34 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pollpal.c,v 1.4 2022/03/28 12:33:22 riastradh Exp $");
#include <sys/module.h>
#include <sys/param.h>
@@ -311,7 +311,8 @@ pollpal_modcmd(modcmd_t cmd, void *arg __unused)
case MODULE_CMD_FINI:
if (pollpal_nopen != 0)
return EBUSY;
- return devsw_detach(NULL, &pollpal_cdevsw);
+ devsw_detach(NULL, &pollpal_cdevsw);
+ return 0;
default:
return ENOTTY;
}