summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorStefan Fritsch <sf@cvs.openbsd.org>2017-09-08 08:37:53 +0000
committerStefan Fritsch <sf@cvs.openbsd.org>2017-09-08 08:37:53 +0000
commit2ba1268ab5b259227e11df1e247113bebd6135fd (patch)
treebee739828b295de6ab54f91d6a9cfb8f52e29024 /sys/dev
parent3a4427e72e2d6684eb8364505d8f6c9e790fd1b0 (diff)
fdc: Print warning if kthread_create fails
Other drivers do this, too. Fixes coverity CID 1455436.
Diffstat (limited to 'sys/dev')
-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