diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2001-05-16 12:51:51 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2001-05-16 12:51:51 +0000 |
commit | 87f10021e726a2d2d79e079d9fe15180e3023b3e (patch) | |
tree | 3dac3102be5f942a0db26367ab9ee941dbe8dd02 /sys/dev/ic | |
parent | a1ba5f046489f61451990b86f39a64f15b7a177a (diff) |
No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/ac97.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/adw.c | 12 |
2 files changed, 5 insertions, 12 deletions
diff --git a/sys/dev/ic/ac97.c b/sys/dev/ic/ac97.c index 3534f0b0832..57e0a4dd01c 100644 --- a/sys/dev/ic/ac97.c +++ b/sys/dev/ic/ac97.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ac97.c,v 1.16 2001/05/16 08:19:21 deraadt Exp $ */ +/* $OpenBSD: ac97.c,v 1.17 2001/05/16 12:51:48 ho Exp $ */ /* * Copyright (c) 1999, 2000 Constantine Sapuntzakis @@ -583,9 +583,6 @@ ac97_attach(host_if) int error, i; as = malloc(sizeof(struct ac97_softc), M_DEVBUF, M_WAITOK); - if (!as) - return (ENOMEM); - bzero(as, sizeof(*as)); as->codec_if.vtbl = &ac97civ; diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index 1d79611dd7d..da0dd14582d 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw.c,v 1.17 2001/04/11 04:05:15 krw Exp $ */ +/* $OpenBSD: adw.c,v 1.18 2001/05/16 12:51:48 ho Exp $ */ /* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */ /* @@ -219,13 +219,9 @@ adw_alloc_carriers(sc) /* * Allocate the control structure. */ - sc->sc_control->carriers = malloc(sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, - M_DEVBUF, M_WAITOK); - if(!sc->sc_control->carriers) { - printf("%s: malloc() failed in allocating carrier structures\n", - sc->sc_dev.dv_xname); - return (ENOMEM); - } + sc->sc_control->carriers = + malloc(sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, M_DEVBUF, + M_WAITOK); if ((error = bus_dmamem_alloc(sc->sc_dmat, sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, |