diff options
-rw-r--r-- | sys/dev/ic/ac97.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/adw.c | 12 | ||||
-rw-r--r-- | sys/dev/pci/auvia.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/isp_pci.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/maestro.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/ncr.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/pccbb.c | 9 | ||||
-rw-r--r-- | sys/dev/ramdisk.c | 6 | ||||
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 4 | ||||
-rw-r--r-- | sys/dev/wscons/wsdisplay_compat_usl.c | 4 |
10 files changed, 16 insertions, 52 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, diff --git a/sys/dev/pci/auvia.c b/sys/dev/pci/auvia.c index 3a2dbfcdaed..c534a1a9933 100644 --- a/sys/dev/pci/auvia.c +++ b/sys/dev/pci/auvia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auvia.c,v 1.7 2001/05/16 05:22:58 mickey Exp $ */ +/* $OpenBSD: auvia.c,v 1.8 2001/05/16 12:51:49 ho Exp $ */ /* $NetBSD: auvia.c,v 1.7 2000/11/15 21:06:33 jdolecek Exp $ */ /*- @@ -820,11 +820,6 @@ auvia_build_dma_ops(struct auvia_softc *sc, struct auvia_softc_chan *ch, ch->sc_dma_ops = auvia_malloc(sc, 0, sizeof(struct auvia_dma_op) * segs, M_DEVBUF, M_WAITOK); - if (ch->sc_dma_ops == NULL) { - printf("%s: couldn't build dmaops\n", sc->sc_dev.dv_xname); - return 1; - } - for (dp = sc->sc_dmas; dp && dp->addr != (void *)(ch->sc_dma_ops); dp = dp->next) diff --git a/sys/dev/pci/isp_pci.c b/sys/dev/pci/isp_pci.c index 47e940d00bf..6612d54a7df 100644 --- a/sys/dev/pci/isp_pci.c +++ b/sys/dev/pci/isp_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_pci.c,v 1.18 2001/04/04 22:05:37 mjacob Exp $ */ +/* $OpenBSD: isp_pci.c,v 1.19 2001/05/16 12:51:49 ho Exp $ */ /* * PCI specific probe and attach routines for Qlogic ISP SCSI adapters. * @@ -769,17 +769,9 @@ isp_pci_mbxdma(struct ispsoftc *isp) len = isp->isp_maxcmds * sizeof (XS_T); isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_WAITOK); - if (isp->isp_xflist == NULL) { - printf("%s: cannot malloc xflist array\n", isp->isp_name); - return (1); - } bzero(isp->isp_xflist, len); len = isp->isp_maxcmds * sizeof (bus_dmamap_t); pci->pci_xfer_dmap = (bus_dmamap_t *) malloc(len, M_DEVBUF, M_WAITOK); - if (pci->pci_xfer_dmap == NULL) { - printf("%s: cannot dma xfer map array\n", isp->isp_name); - return (1); - } /* * Allocate and map the request queue. diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c index 78bd8776e14..58d4a6ea3cc 100644 --- a/sys/dev/pci/maestro.c +++ b/sys/dev/pci/maestro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: maestro.c,v 1.4 2001/03/13 01:45:56 deraadt Exp $ */ +/* $OpenBSD: maestro.c,v 1.5 2001/05/16 12:51:50 ho Exp $ */ /* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */ /* * FreeBSD's ESS Agogo/Maestro driver @@ -1508,8 +1508,6 @@ salloc_new(addr, size, nzones) MALLOC(pool, salloc_t, sizeof *pool + nzones * sizeof pool->zones[0], M_TEMP, M_WAITOK); - if (pool == NULL) - return NULL; SLIST_INIT(&pool->free); SLIST_INIT(&pool->used); SLIST_INIT(&pool->spare); diff --git a/sys/dev/pci/ncr.c b/sys/dev/pci/ncr.c index e2bb618bdce..2e6b1651c89 100644 --- a/sys/dev/pci/ncr.c +++ b/sys/dev/pci/ncr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncr.c,v 1.54 2001/04/06 04:42:07 csapuntz Exp $ */ +/* $OpenBSD: ncr.c,v 1.55 2001/05/16 12:51:49 ho Exp $ */ /* $NetBSD: ncr.c,v 1.63 1997/09/23 02:39:15 perry Exp $ */ /************************************************************************** @@ -1464,7 +1464,7 @@ static void ncr_attach (pcici_t tag, int unit); #if 0 static char ident[] = - "\n$OpenBSD: ncr.c,v 1.54 2001/04/06 04:42:07 csapuntz Exp $\n"; + "\n$OpenBSD: ncr.c,v 1.55 2001/05/16 12:51:49 ho Exp $\n"; #endif static const u_long ncr_version = NCR_VERSION * 11 @@ -3662,7 +3662,6 @@ ncr_attach(parent, self, aux) np->sc_pc = pc; np->ccb = (ccb_p) malloc (sizeof (struct ccb), M_DEVBUF, M_WAITOK); - if (!np->ccb) return; #if defined(__mips__) pci_sync_cache(pc, (vm_offset_t)np->ccb, sizeof (struct ccb)); np->ccb = (struct ccb *)PHYS_TO_UNCACHED(NCR_KVATOPHYS(np, np->ccb)); @@ -3768,13 +3767,11 @@ static void ncr_attach (pcici_t config_id, int unit) if (!np) { np = (ncb_p) malloc (sizeof (struct ncb), M_DEVBUF, M_WAITOK); - if (!np) return; ncrp[unit]=np; } bzero (np, sizeof (*np)); np->ccb = (ccb_p) malloc (sizeof (struct ccb), M_DEVBUF, M_WAITOK); - if (!np->ccb) return; #if defined(__mips__) pci_sync_cache(pc, (vm_offset_t)np->ccb, sizeof (struct ccb)); np->ccb = (struct ccb *)PHYS_TO_UNCACHED(NCR_KVATOPHYS(np, np->ccb)); diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c index 40558d3263e..b661b6094cf 100644 --- a/sys/dev/pci/pccbb.c +++ b/sys/dev/pci/pccbb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccbb.c,v 1.18 2001/05/01 02:19:46 mickey Exp $ */ +/* $OpenBSD: pccbb.c,v 1.19 2001/05/16 12:51:49 ho Exp $ */ /* $NetBSD: pccbb.c,v 1.42 2000/06/16 23:41:35 cgd Exp $ */ /* @@ -1688,11 +1688,8 @@ pccbb_intr_establish(sc, irq, level, func, arg) /* * Allocate a room for interrupt handler structure. */ - if (NULL == (newpil = - (struct pccbb_intrhand_list *)malloc(sizeof(struct - pccbb_intrhand_list), M_DEVBUF, M_WAITOK))) { - return NULL; - } + newpil = (struct pccbb_intrhand_list *) + malloc(sizeof(struct pccbb_intrhand_list), M_DEVBUF, M_WAITOK); newpil->pil_func = func; newpil->pil_arg = arg; diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c index aaf28e73aa1..43ee642e441 100644 --- a/sys/dev/ramdisk.c +++ b/sys/dev/ramdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ramdisk.c,v 1.11 1999/11/16 09:24:59 art Exp $ */ +/* $OpenBSD: ramdisk.c,v 1.12 2001/05/16 12:51:48 ho Exp $ */ /* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */ /* @@ -161,10 +161,6 @@ rdattach(n) for (i = 0; i < n; i++) { sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK); - if (!sc) { - printf("ramdisk: malloc for attach failed!\n"); - return; - } bzero((caddr_t)sc, sizeof(*sc)); ramdisk_devs[i] = sc; sc->sc_dev.dv_unit = i; diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index d931bb8580e..dbfa6441287 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.26 2001/05/08 22:28:43 mickey Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.27 2001/05/16 12:51:50 ho Exp $ */ /* $NetBSD: wsdisplay.c,v 1.37.4.1 2000/06/30 16:27:53 simonb Exp $ */ /* @@ -266,8 +266,6 @@ wsscreen_attach(sc, console, emul, type, cookie, ccol, crow, defattr) struct wsscreen *scr; scr = malloc(sizeof(struct wsscreen), M_DEVBUF, M_WAITOK); - if (!scr) - return (NULL); if (console) { dconf = &wsdisplay_console_conf; diff --git a/sys/dev/wscons/wsdisplay_compat_usl.c b/sys/dev/wscons/wsdisplay_compat_usl.c index a45872a21d5..57510d92ede 100644 --- a/sys/dev/wscons/wsdisplay_compat_usl.c +++ b/sys/dev/wscons/wsdisplay_compat_usl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay_compat_usl.c,v 1.6 2001/05/16 05:07:51 millert Exp $ */ +/* $OpenBSD: wsdisplay_compat_usl.c,v 1.7 2001/05/16 12:51:50 ho Exp $ */ /* $NetBSD: wsdisplay_compat_usl.c,v 1.12 2000/03/23 07:01:47 thorpej Exp $ */ /* @@ -101,8 +101,6 @@ usl_sync_init(scr, sdp, p, acqsig, relsig, frsig) int res; sd = malloc(sizeof(struct usl_syncdata), M_DEVBUF, M_WAITOK); - if (!sd) - return (ENOMEM); sd->s_scr = scr; sd->s_proc = p; sd->s_pid = p->p_pid; |