summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsf <sf@openbsd.org>2017-09-08 08:37:52 +0000
committersf <sf@openbsd.org>2017-09-08 08:37:52 +0000
commit4011372532a6340a02f404ab5004d47e99f0bf9d (patch)
treec359ff088ef85166a2fb4f1d62dfff580369956c
parentuse plain values for transaction error codes rather than a bitmask. (diff)
downloadwireguard-openbsd-4011372532a6340a02f404ab5004d47e99f0bf9d.tar.xz
wireguard-openbsd-4011372532a6340a02f404ab5004d47e99f0bf9d.zip
fdc: Print warning if kthread_create fails
Other drivers do this, too. Fixes coverity CID 1455436.
-rw-r--r--sys/dev/isa/fdc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/isa/fdc.c b/sys/dev/isa/fdc.c
index 75e8e9f7d67..ca1a2aee617 100644
--- a/sys/dev/isa/fdc.c
+++ b/sys/dev/isa/fdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdc.c,v 1.21 2017/09/03 20:03:58 sf Exp $ */
+/* $OpenBSD: fdc.c,v 1.22 2017/09/08 08:37:52 sf Exp $ */
/* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */
/*-
@@ -170,7 +170,11 @@ fdcattach(struct device *parent, struct device *self, void *aux)
void
fdc_create_kthread(void *arg)
{
- kthread_create(fdcattach_deferred, arg, NULL, "fdcattach");
+ struct fdc_softc *sc = arg;
+ if (kthread_create(fdcattach_deferred, arg, NULL, "fdcattach") != 0) {
+ printf("%s: failed to create kernel thread, disabled\n",
+ sc->sc_dev.dv_xname);
+ }
}
void