diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-05-16 19:19:29 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-05-16 19:19:29 +0000 |
commit | 04f41b8b8704c60d6c5a6ecccb5d6aeaae95523f (patch) | |
tree | d9de237a32c1d2d0278f19bf4dfe1a9b9862df07 /sys/dev/ic/adw.c | |
parent | 30611c2b5a45b4b273b478969877794a3c4e684e (diff) |
allocate memory w/ NOWAIT during autoconf time and check for NULL return
Diffstat (limited to 'sys/dev/ic/adw.c')
-rw-r--r-- | sys/dev/ic/adw.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index da0dd14582d..df17e5d820f 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw.c,v 1.18 2001/05/16 12:51:48 ho Exp $ */ +/* $OpenBSD: adw.c,v 1.19 2001/05/16 19:19:28 mickey Exp $ */ /* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */ /* @@ -221,7 +221,10 @@ adw_alloc_carriers(sc) */ sc->sc_control->carriers = malloc(sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, M_DEVBUF, - M_WAITOK); + M_NOWAIT); + if (sc->sc_control->carriers == NULL) + return (ENOMEM); + if ((error = bus_dmamem_alloc(sc->sc_dmat, sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, |