summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2007-06-12 19:29:24 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2007-06-12 19:29:24 +0000
commit0d1be26cb91d524fab15a0fdb0c44aaba94a85df (patch)
tree80bb15d9d6797f37418aeed64e123de54b295389 /sys
parent649c92aa08863c7e91d2f9aefc3f71b9c9e3bfaf (diff)
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.c10
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));