summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-05-16 19:27:39 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-05-16 19:27:39 +0000
commit5cb7a0a0e00c3a39f1e009b59368e98640327ca4 (patch)
tree22dff9237ea2c408b1615286399cda80f3c03ccf
parent04f41b8b8704c60d6c5a6ecccb5d6aeaae95523f (diff)
it is notright to malloc() w/ WAITOK at attach time, put back NULL check and change to NOWAIT
-rw-r--r--sys/dev/pci/maestro.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c
index 58d4a6ea3cc..2f1f5d2f02d 100644
--- a/sys/dev/pci/maestro.c
+++ b/sys/dev/pci/maestro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maestro.c,v 1.5 2001/05/16 12:51:50 ho Exp $ */
+/* $OpenBSD: maestro.c,v 1.6 2001/05/16 19:27:38 mickey Exp $ */
/* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */
/*
* FreeBSD's ESS Agogo/Maestro driver
@@ -1507,7 +1507,9 @@ salloc_new(addr, size, nzones)
int i;
MALLOC(pool, salloc_t, sizeof *pool + nzones * sizeof pool->zones[0],
- M_TEMP, M_WAITOK);
+ M_TEMP, M_NOWAIT);
+ if (pool == NULL)
+ return NULL;
SLIST_INIT(&pool->free);
SLIST_INIT(&pool->used);
SLIST_INIT(&pool->spare);