diff options
author | 2007-06-12 19:29:23 +0000 | |
---|---|---|
committer | 2007-06-12 19:29:23 +0000 | |
commit | 8688e2f47afd6f24db9575d26655a664c25686d5 (patch) | |
tree | 2abbfd5d2ac71b69a4c378df4f4697f8c0274e49 /sys | |
parent | remove some unused externs; (diff) | |
download | wireguard-openbsd-8688e2f47afd6f24db9575d26655a664c25686d5.tar.xz wireguard-openbsd-8688e2f47afd6f24db9575d26655a664c25686d5.zip |
add M_CANFAIL to malloc() flags, requested by
marco after I showed him a diff to remove the
malloc retun values since they are all called
with M_WAITOK.
ok marco@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/mpi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index 930161efd5f..8192dfd743d 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.85 2007/05/31 18:21:44 dlg Exp $ */ +/* $OpenBSD: mpi.c,v 1.86 2007/06/12 19:29:23 thib Exp $ */ /* * Copyright (c) 2005, 2006 David Gwynne <dlg@openbsd.org> @@ -341,7 +341,7 @@ mpi_run_ppr(struct mpi_softc *sc) } pagelen = hdr.page_length * 4; /* dwords to bytes */ - physdisk_pg = malloc(pagelen, M_TEMP, M_WAITOK); + physdisk_pg = malloc(pagelen, M_TEMP, M_WAITOK|M_CANFAIL); if (physdisk_pg == NULL) { DNPRINTF(MPI_D_RAID|MPI_D_PPR, "%s: mpi_run_ppr unable to " "allocate ioc pg 3\n", DEVNAME(sc)); @@ -798,7 +798,7 @@ mpi_alloc_ccbs(struct mpi_softc *sc) TAILQ_INIT(&sc->sc_ccb_free); sc->sc_ccbs = malloc(sizeof(struct mpi_ccb) * sc->sc_maxcmds, - M_DEVBUF, M_WAITOK); + M_DEVBUF, M_WAITOK|M_CANFAIL); if (sc->sc_ccbs == NULL) { printf("%s: unable to allocate ccbs\n", DEVNAME(sc)); return (1); @@ -892,7 +892,7 @@ mpi_alloc_replies(struct mpi_softc *sc) DNPRINTF(MPI_D_MISC, "%s: mpi_alloc_replies\n", DEVNAME(sc)); sc->sc_rcbs = malloc(MPI_REPLY_COUNT * sizeof(struct mpi_rcb), - M_DEVBUF, M_WAITOK); + M_DEVBUF, M_WAITOK|M_CANFAIL); if (sc->sc_rcbs == NULL) return (1); @@ -2151,7 +2151,7 @@ mpi_get_raid(struct mpi_softc *sc) } pagelen = hdr.page_length * 4; /* dwords to bytes */ - vol_page = malloc(pagelen, M_TEMP, M_WAITOK); + vol_page = malloc(pagelen, M_TEMP, M_WAITOK|M_CANFAIL); if (vol_page == NULL) { DNPRINTF(MPI_D_RAID, "%s: mpi_get_raid unable to allocate " "space for ioc config page 2\n", DEVNAME(sc)); |