From 634288c6fb708ac6b61b1742cec21ebc586cf1b2 Mon Sep 17 00:00:00 2001 From: Thomas Nordin Date: Thu, 10 Jan 2002 00:06:18 +0000 Subject: Check result from malloc(9) when using M_NOWAIT. jason@ ok --- sys/arch/sparc64/dev/sbus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/arch/sparc64/dev/sbus.c') diff --git a/sys/arch/sparc64/dev/sbus.c b/sys/arch/sparc64/dev/sbus.c index 652c414b5bd..c9c776f0d84 100644 --- a/sys/arch/sparc64/dev/sbus.c +++ b/sys/arch/sparc64/dev/sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sbus.c,v 1.8 2002/01/04 05:19:25 jason Exp $ */ +/* $OpenBSD: sbus.c,v 1.9 2002/01/10 00:06:17 nordin Exp $ */ /* $NetBSD: sbus.c,v 1.46 2001/10/07 20:30:41 eeh Exp $ */ /*- @@ -337,6 +337,8 @@ sbus_attach(parent, self, aux) /* Enable the over temp intr */ ih = (struct intrhand *) malloc(sizeof(struct intrhand), M_DEVBUF, M_NOWAIT); + if (ih == NULL) + panic("couldn't malloc intrhand"); ih->ih_map = &sc->sc_sysio->therm_int_map; ih->ih_clr = NULL; /* &sc->sc_sysio->therm_clr_int; */ ih->ih_fun = sbus_overtemp; -- cgit v1.2.3