summaryrefslogtreecommitdiff
path: root/sys/arch/vax/dec/dzkbd.c
diff options
context:
space:
mode:
authorThomas Nordin <nordin@cvs.openbsd.org>2002-01-10 00:11:15 +0000
committerThomas Nordin <nordin@cvs.openbsd.org>2002-01-10 00:11:15 +0000
commit4415d12cf360370d4f92c85f6e8cf8a57f7ed1e5 (patch)
treec9acc85a2f35ca718e5ed60da3a4d80e3ff0c89f /sys/arch/vax/dec/dzkbd.c
parent634288c6fb708ac6b61b1742cec21ebc586cf1b2 (diff)
Check result from malloc(9) when using M_NOWAIT. hugh@ ok
Diffstat (limited to 'sys/arch/vax/dec/dzkbd.c')
-rw-r--r--sys/arch/vax/dec/dzkbd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/vax/dec/dzkbd.c b/sys/arch/vax/dec/dzkbd.c
index b96949d9848..2670dcc39fd 100644
--- a/sys/arch/vax/dec/dzkbd.c
+++ b/sys/arch/vax/dec/dzkbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dzkbd.c,v 1.1 2001/05/16 22:15:17 hugh Exp $ */
+/* $OpenBSD: dzkbd.c,v 1.2 2002/01/10 00:11:14 nordin Exp $ */
/* $NetBSD: dzkbd.c,v 1.1 2000/12/02 17:03:55 ragge Exp $ */
/*
@@ -175,6 +175,8 @@ dzkbd_attach(struct device *parent, struct device *self, void *aux)
} else {
dzi = malloc(sizeof(struct dzkbd_internal),
M_DEVBUF, M_NOWAIT);
+ if (dzi == NULL)
+ panic("dzkbd_attach");
dzi->dzi_ks.attmt.sendchar = dzkbd_sendchar;
dzi->dzi_ks.attmt.cookie = ls;
dzi->dzi_ls = ls;