Page MenuHomeFreeBSD

D25766.id.diff
No OneTemporary

D25766.id.diff

Index: head/sys/dev/mpr/mpr.c
===================================================================
--- head/sys/dev/mpr/mpr.c
+++ head/sys/dev/mpr/mpr.c
@@ -1529,10 +1529,6 @@
*/
sc->commands = malloc(sizeof(struct mpr_command) * sc->num_reqs,
M_MPR, M_WAITOK | M_ZERO);
- if (!sc->commands) {
- mpr_dprint(sc, MPR_ERROR, "Cannot allocate command memory\n");
- return (ENOMEM);
- }
for (i = 1; i < sc->num_reqs; i++) {
cm = &sc->commands[i];
cm->cm_req = sc->req_frames + i * sc->reqframesz;
@@ -2684,11 +2680,6 @@
int error = 0;
eh = malloc(sizeof(struct mpr_event_handle), M_MPR, M_WAITOK|M_ZERO);
- if (!eh) {
- mpr_dprint(sc, MPR_EVENT|MPR_ERROR,
- "Cannot allocate event memory\n");
- return (ENOMEM);
- }
eh->callback = cb;
eh->data = data;
TAILQ_INSERT_TAIL(&sc->event_list, eh, eh_list);
Index: head/sys/dev/mpr/mpr_sas.c
===================================================================
--- head/sys/dev/mpr/mpr_sas.c
+++ head/sys/dev/mpr/mpr_sas.c
@@ -736,11 +736,6 @@
mpr_dprint(sc, MPR_INIT, "%s entered\n", __func__);
sassc = malloc(sizeof(struct mprsas_softc), M_MPR, M_WAITOK|M_ZERO);
- if (!sassc) {
- mpr_dprint(sc, MPR_INIT|MPR_ERROR,
- "Cannot allocate SAS subsystem memory\n");
- return (ENOMEM);
- }
/*
* XXX MaxTargets could change during a reinit. Since we don't
@@ -751,12 +746,6 @@
sassc->maxtargets = sc->facts->MaxTargets + sc->facts->MaxVolumes;
sassc->targets = malloc(sizeof(struct mprsas_target) *
sassc->maxtargets, M_MPR, M_WAITOK|M_ZERO);
- if (!sassc->targets) {
- mpr_dprint(sc, MPR_INIT|MPR_ERROR,
- "Cannot allocate SAS target memory\n");
- free(sassc, M_MPR);
- return (ENOMEM);
- }
sc->sassc = sassc;
sassc->sc = sc;
@@ -3556,8 +3545,4 @@
sassc->targets = malloc(sizeof(struct mprsas_target) * maxtargets,
M_MPR, M_WAITOK|M_ZERO);
- if (!sassc->targets) {
- panic("%s failed to alloc targets with error %d\n",
- __func__, ENOMEM);
- }
}
Index: head/sys/dev/mpr/mpr_user.c
===================================================================
--- head/sys/dev/mpr/mpr_user.c
+++ head/sys/dev/mpr/mpr_user.c
@@ -1528,13 +1528,6 @@
bzero(sc->fw_diag_buffer, buffer_size);
ctx = malloc(sizeof(*ctx), M_MPR, M_WAITOK | M_ZERO);
- if (ctx == NULL) {
- device_printf(sc->mpr_dev, "%s: context malloc failed\n",
- __func__);
- *return_code = MPR_FW_DIAG_ERROR_NO_BUFFER;
- status = MPR_DIAG_FAILURE;
- goto bailout;
- }
ctx->addr = &sc->fw_diag_busaddr;
ctx->buffer_dmat = sc->fw_diag_dmat;
ctx->buffer_dmamap = sc->fw_diag_map;
Index: head/sys/dev/mps/mps.c
===================================================================
--- head/sys/dev/mps/mps.c
+++ head/sys/dev/mps/mps.c
@@ -1520,10 +1520,6 @@
*/
sc->commands = malloc(sizeof(struct mps_command) * sc->num_reqs,
M_MPT2, M_WAITOK | M_ZERO);
- if(!sc->commands) {
- mps_dprint(sc, MPS_ERROR, "Cannot allocate command memory\n");
- return (ENOMEM);
- }
for (i = 1; i < sc->num_reqs; i++) {
cm = &sc->commands[i];
cm->cm_req = sc->req_frames + i * sc->reqframesz;
@@ -2598,10 +2594,6 @@
int error = 0;
eh = malloc(sizeof(struct mps_event_handle), M_MPT2, M_WAITOK|M_ZERO);
- if(!eh) {
- mps_dprint(sc, MPS_ERROR, "Cannot allocate event memory\n");
- return (ENOMEM);
- }
eh->callback = cb;
eh->data = data;
TAILQ_INSERT_TAIL(&sc->event_list, eh, eh_list);
Index: head/sys/dev/mps/mps_sas.c
===================================================================
--- head/sys/dev/mps/mps_sas.c
+++ head/sys/dev/mps/mps_sas.c
@@ -722,11 +722,6 @@
mps_dprint(sc, MPS_INIT, "%s entered\n", __func__);
sassc = malloc(sizeof(struct mpssas_softc), M_MPT2, M_WAITOK|M_ZERO);
- if(!sassc) {
- mps_dprint(sc, MPS_INIT|MPS_ERROR,
- "Cannot allocate SAS controller memory\n");
- return (ENOMEM);
- }
/*
* XXX MaxTargets could change during a reinit. Since we don't
@@ -737,12 +732,6 @@
sassc->maxtargets = sc->facts->MaxTargets + sc->facts->MaxVolumes;
sassc->targets = malloc(sizeof(struct mpssas_target) *
sassc->maxtargets, M_MPT2, M_WAITOK|M_ZERO);
- if(!sassc->targets) {
- mps_dprint(sc, MPS_INIT|MPS_ERROR,
- "Cannot allocate SAS target memory\n");
- free(sassc, M_MPT2);
- return (ENOMEM);
- }
sc->sassc = sassc;
sassc->sc = sc;
@@ -3421,8 +3410,4 @@
sassc->targets = malloc(sizeof(struct mpssas_target) * maxtargets,
M_MPT2, M_WAITOK|M_ZERO);
- if (!sassc->targets) {
- panic("%s failed to alloc targets with error %d\n",
- __func__, ENOMEM);
- }
}
Index: head/sys/dev/mps/mps_user.c
===================================================================
--- head/sys/dev/mps/mps_user.c
+++ head/sys/dev/mps/mps_user.c
@@ -1436,13 +1436,6 @@
bzero(sc->fw_diag_buffer, buffer_size);
ctx = malloc(sizeof(*ctx), M_MPSUSER, M_WAITOK | M_ZERO);
- if (ctx == NULL) {
- device_printf(sc->mps_dev, "%s: context malloc failed\n",
- __func__);
- *return_code = MPS_FW_DIAG_ERROR_NO_BUFFER;
- status = MPS_DIAG_FAILURE;
- goto bailout;
- }
ctx->addr = &sc->fw_diag_busaddr;
ctx->buffer_dmat = sc->fw_diag_dmat;
ctx->buffer_dmamap = sc->fw_diag_map;

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 24, 1:46 AM (10 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24097633
Default Alt Text
D25766.id.diff (5 KB)

Event Timeline