summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-05-16 19:31:41 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-05-16 19:31:41 +0000
commitf9efe3c25190a9f646c260cfd2224d17980bf53b (patch)
tree5c48d145d3778b8b424bf37ab321557532ed7cda /sys
parent5cb7a0a0e00c3a39f1e009b59368e98640327ca4 (diff)
it is notright to malloc() w/ WAITOK at attach time, put back NULL check and change to NOWAIT
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/ncr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/ncr.c b/sys/dev/pci/ncr.c
index 2e6b1651c89..d093efa7094 100644
--- a/sys/dev/pci/ncr.c
+++ b/sys/dev/pci/ncr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr.c,v 1.55 2001/05/16 12:51:49 ho Exp $ */
+/* $OpenBSD: ncr.c,v 1.56 2001/05/16 19:31:40 mickey Exp $ */
/* $NetBSD: ncr.c,v 1.63 1997/09/23 02:39:15 perry Exp $ */
/**************************************************************************
@@ -1464,7 +1464,7 @@ static void ncr_attach (pcici_t tag, int unit);
#if 0
static char ident[] =
- "\n$OpenBSD: ncr.c,v 1.55 2001/05/16 12:51:49 ho Exp $\n";
+ "\n$OpenBSD: ncr.c,v 1.56 2001/05/16 19:31:40 mickey Exp $\n";
#endif
static const u_long ncr_version = NCR_VERSION * 11
@@ -3661,7 +3661,9 @@ ncr_attach(parent, self, aux)
#endif /*__mips__*/
np->sc_pc = pc;
- np->ccb = (ccb_p) malloc (sizeof (struct ccb), M_DEVBUF, M_WAITOK);
+ np->ccb = (ccb_p) malloc (sizeof (struct ccb), M_DEVBUF, M_NOWAIT);
+ if (np->ccb == NULL)
+ return;
#if defined(__mips__)
pci_sync_cache(pc, (vm_offset_t)np->ccb, sizeof (struct ccb));
np->ccb = (struct ccb *)PHYS_TO_UNCACHED(NCR_KVATOPHYS(np, np->ccb));