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/pci | |
parent | a1ba5f046489f61451990b86f39a64f15b7a177a (diff) |
No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)
Diffstat (limited to 'sys/dev/pci')
-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 |
5 files changed, 8 insertions, 29 deletions
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; |