summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-05-16 19:33:34 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-05-16 19:33:34 +0000
commit8fcf1a0753ee730cae452fe7f3126b2750a03d45 (patch)
tree40ef291ea9e865e31aacde61c41f2b658dfe83e6 /sys/dev/pci
parentf9efe3c25190a9f646c260cfd2224d17980bf53b (diff)
malloc memory w/ NOWAIT during autoconf time, and check for NULL
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/tga.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/tga.c b/sys/dev/pci/tga.c
index b1c1847d31e..1cfdf4e77d6 100644
--- a/sys/dev/pci/tga.c
+++ b/sys/dev/pci/tga.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tga.c,v 1.6 2001/03/19 00:18:05 aaron Exp $ */
+/* $OpenBSD: tga.c,v 1.7 2001/05/16 19:33:33 mickey Exp $ */
/* $NetBSD: tga.c,v 1.31 2001/02/11 19:34:58 nathanw Exp $ */
/*
@@ -426,7 +426,9 @@ tgaattach(parent, self, aux)
sc->nscreens = 1;
} else {
sc->sc_dc = (struct tga_devconfig *)
- malloc(sizeof(struct tga_devconfig), M_DEVBUF, M_WAITOK);
+ malloc(sizeof(struct tga_devconfig), M_DEVBUF, M_NOWAIT);
+ if (sc->sc_dc == NULL)
+ return;
bzero(sc->sc_dc, sizeof(struct tga_devconfig));
tga_getdevconfig(pa->pa_memt, pa->pa_pc, pa->pa_tag,
sc->sc_dc);