summaryrefslogtreecommitdiff
path: root/sys/dev/ic/vga.c
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-05-16 19:17:02 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-05-16 19:17:02 +0000
commit30611c2b5a45b4b273b478969877794a3c4e684e (patch)
tree81f988efe8c96637951607dfcf85a0ed04d1fcc8 /sys/dev/ic/vga.c
parent39fe5918c0371535032ed7078a6c405be96d7141 (diff)
allocate memory w/ NOWAIT during autoconf time and check for NULL return
Diffstat (limited to 'sys/dev/ic/vga.c')
-rw-r--r--sys/dev/ic/vga.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c
index baccb16eb48..5857391a7e1 100644
--- a/sys/dev/ic/vga.c
+++ b/sys/dev/ic/vga.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga.c,v 1.25 2001/05/08 22:28:43 mickey Exp $ */
+/* $OpenBSD: vga.c,v 1.26 2001/05/16 19:17:01 mickey Exp $ */
/* $NetBSD: vga.c,v 1.28.2.1 2000/06/30 16:27:47 simonb Exp $ */
/*
@@ -519,7 +519,9 @@ vga_extended_attach(self, iot, memt, type, map)
vc = &vga_console_vc;
vga_console_attached = 1;
} else {
- vc = malloc(sizeof(struct vga_config), M_DEVBUF, M_WAITOK);
+ vc = malloc(sizeof(struct vga_config), M_DEVBUF, M_NOWAIT);
+ if (vc == NULL)
+ return;
bzero(vc, sizeof(struct vga_config));
vga_init(vc, iot, memt);
}