diff --git a/sys/dev/ae/if_ae.c b/sys/dev/ae/if_ae.c --- a/sys/dev/ae/if_ae.c +++ b/sys/dev/ae/if_ae.c @@ -362,12 +362,6 @@ */ sc->tq = taskqueue_create_fast("ae_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->tq); - if (sc->tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->dev)); diff --git a/sys/dev/age/if_age.c b/sys/dev/age/if_age.c --- a/sys/dev/age/if_age.c +++ b/sys/dev/age/if_age.c @@ -628,12 +628,6 @@ /* Create local taskq. */ sc->age_tq = taskqueue_create_fast("age_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->age_tq); - if (sc->age_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->age_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->age_dev)); diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c --- a/sys/dev/alc/if_alc.c +++ b/sys/dev/alc/if_alc.c @@ -1639,12 +1639,6 @@ /* Create local taskq. */ sc->alc_tq = taskqueue_create_fast("alc_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->alc_tq); - if (sc->alc_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->alc_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->alc_dev)); diff --git a/sys/dev/ale/if_ale.c b/sys/dev/ale/if_ale.c --- a/sys/dev/ale/if_ale.c +++ b/sys/dev/ale/if_ale.c @@ -655,12 +655,6 @@ /* Create local taskq. */ sc->ale_tq = taskqueue_create_fast("ale_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->ale_tq); - if (sc->ale_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->ale_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->ale_dev)); diff --git a/sys/dev/axgbe/if_axgbe_pci.c b/sys/dev/axgbe/if_axgbe_pci.c --- a/sys/dev/axgbe/if_axgbe_pci.c +++ b/sys/dev/axgbe/if_axgbe_pci.c @@ -560,11 +560,6 @@ /* create the workqueue */ pdata->dev_workqueue = taskqueue_create("axgbe", M_WAITOK, taskqueue_thread_enqueue, &pdata->dev_workqueue); - if (pdata->dev_workqueue == NULL) { - axgbe_error("Unable to allocate workqueue\n"); - ret = ENOMEM; - goto free_channels; - } ret = taskqueue_start_threads(&pdata->dev_workqueue, 1, PI_NET, "axgbe dev taskq"); if (ret) { @@ -580,8 +575,6 @@ free_task_queue: taskqueue_free(pdata->dev_workqueue); - -free_channels: axgbe_free_channels(sc); release_bus_resource: diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -3890,12 +3890,6 @@ ~BGE_MSIMODE_ONE_SHOT_DISABLE); sc->bge_tq = taskqueue_create_fast("bge_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->bge_tq); - if (sc->bge_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENOMEM; - goto fail; - } error = taskqueue_start_threads(&sc->bge_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->bge_dev)); if (error != 0) { diff --git a/sys/dev/cas/if_cas.c b/sys/dev/cas/if_cas.c --- a/sys/dev/cas/if_cas.c +++ b/sys/dev/cas/if_cas.c @@ -205,11 +205,6 @@ TASK_INIT(&sc->sc_tx_task, 1, cas_tx_task, ifp); sc->sc_tq = taskqueue_create_fast("cas_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->sc_tq); - if (sc->sc_tq == NULL) { - device_printf(sc->sc_dev, "could not create taskqueue\n"); - error = ENXIO; - goto fail_ifnet; - } error = taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->sc_dev)); if (error != 0) { @@ -462,7 +457,6 @@ bus_dma_tag_destroy(sc->sc_pdmatag); fail_taskq: taskqueue_free(sc->sc_tq); - fail_ifnet: if_free(ifp); return (error); } diff --git a/sys/dev/dpaa2/dpaa2_channel.c b/sys/dev/dpaa2/dpaa2_channel.c --- a/sys/dev/dpaa2/dpaa2_channel.c +++ b/sys/dev/dpaa2/dpaa2_channel.c @@ -146,12 +146,6 @@ } ch = malloc(sizeof(struct dpaa2_channel), M_DPAA2_CH, M_WAITOK | M_ZERO); - if (ch == NULL) { - device_printf(dev, "%s: malloc() failed\n", __func__); - error = ENOMEM; - goto fail_malloc; - } - ch->ni_dev = dev; ch->io_dev = iodev; ch->con_dev = condev; @@ -281,7 +275,6 @@ /* taskqueue_drain(ch->cleanup_tq, &ch->cleanup_task); */ /* } */ /* taskqueue_free(ch->cleanup_tq); */ -fail_malloc: (void)DPAA2_CMD_CON_DISABLE(dev, child, DPAA2_CMD_TK(&cmd, contk)); fail_con_enable: (void)DPAA2_CMD_CON_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, contk)); diff --git a/sys/dev/dpaa2/dpaa2_mc.c b/sys/dev/dpaa2/dpaa2_mc.c --- a/sys/dev/dpaa2/dpaa2_mc.c +++ b/sys/dev/dpaa2/dpaa2_mc.c @@ -462,8 +462,6 @@ return (EINVAL); di = malloc(sizeof(*di), M_DPAA2_MC, M_WAITOK | M_ZERO); - if (!di) - return (ENOMEM); di->dpaa2_dev = dpaa2_dev; di->flags = flags; di->owners = 0; diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -588,11 +588,6 @@ /* Create a taskqueue thread to release new buffers to the pool. */ sc->bp_taskq = taskqueue_create(tq_name, M_WAITOK, taskqueue_thread_enqueue, &sc->bp_taskq); - if (sc->bp_taskq == NULL) { - device_printf(dev, "%s: failed to allocate task queue: %s\n", - __func__, tq_name); - goto close_ni; - } taskqueue_start_threads(&sc->bp_taskq, 1, PI_NET, "%s", tq_name); /* sc->cleanup_taskq = taskqueue_create("dpaa2_ch cleanup", M_WAITOK, */ @@ -1339,21 +1334,11 @@ for (uint64_t j = 0; j < DPAA2_NI_BUFS_PER_TX; j++) { buf = malloc(sizeof(struct dpaa2_buf), M_DPAA2_TXB, M_WAITOK); - if (buf == NULL) { - device_printf(dev, "%s: malloc() failed (buf)\n", - __func__); - return (ENOMEM); - } /* Keep DMA tag and Tx ring linked to the buffer */ DPAA2_BUF_INIT_TAGOPT(buf, ch->tx_dmat, tx); buf->sgt = malloc(sizeof(struct dpaa2_buf), M_DPAA2_TXB, M_WAITOK); - if (buf->sgt == NULL) { - device_printf(dev, "%s: malloc() failed (sgt)\n", - __func__); - return (ENOMEM); - } /* Link SGT to DMA tag and back to its Tx buffer */ DPAA2_BUF_INIT_TAGOPT(buf->sgt, ch->sgt_dmat, buf); diff --git a/sys/dev/jme/if_jme.c b/sys/dev/jme/if_jme.c --- a/sys/dev/jme/if_jme.c +++ b/sys/dev/jme/if_jme.c @@ -872,12 +872,6 @@ /* Create local taskq. */ sc->jme_tq = taskqueue_create_fast("jme_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->jme_tq); - if (sc->jme_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->jme_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->jme_dev)); diff --git a/sys/dev/liquidio/base/lio_request_manager.c b/sys/dev/liquidio/base/lio_request_manager.c --- a/sys/dev/liquidio/base/lio_request_manager.c +++ b/sys/dev/liquidio/base/lio_request_manager.c @@ -159,11 +159,6 @@ db_tq = &oct->check_db_tq[iq_no]; db_tq->tq = taskqueue_create("lio_check_db_timeout", M_WAITOK, taskqueue_thread_enqueue, &db_tq->tq); - if (db_tq->tq == NULL) { - lio_dev_err(oct, "check db wq create failed for iq %d\n", - iq_no); - return (1); - } TIMEOUT_TASK_INIT(db_tq->tq, &db_tq->work, 0, lio_check_db_timeout, (void *)db_tq); @@ -179,10 +174,6 @@ oct->instr_queue[iq_no]->br = buf_ring_alloc(LIO_BR_SIZE, M_DEVBUF, M_WAITOK, &oct->instr_queue[iq_no]->enq_lock); - if (oct->instr_queue[iq_no]->br == NULL) { - lio_dev_err(oct, "Critical Failure setting up buf ring\n"); - return (1); - } return (0); } diff --git a/sys/dev/liquidio/base/lio_response_manager.c b/sys/dev/liquidio/base/lio_response_manager.c --- a/sys/dev/liquidio/base/lio_response_manager.c +++ b/sys/dev/liquidio/base/lio_response_manager.c @@ -59,10 +59,6 @@ ctq = &oct->dma_comp_tq; ctq->tq = taskqueue_create("lio_dma_comp", M_WAITOK, taskqueue_thread_enqueue, &ctq->tq); - if (ctq->tq == NULL) { - lio_dev_err(oct, "failed to create wq thread\n"); - return (-ENOMEM); - } TIMEOUT_TASK_INIT(ctq->tq, &ctq->work, 0, lio_poll_req_completion, (void *)ctq); diff --git a/sys/dev/liquidio/lio_main.c b/sys/dev/liquidio/lio_main.c --- a/sys/dev/liquidio/lio_main.c +++ b/sys/dev/liquidio/lio_main.c @@ -1854,10 +1854,6 @@ rx_status_tq->tq = taskqueue_create("lio_rx_oom_status", M_WAITOK, taskqueue_thread_enqueue, &rx_status_tq->tq); - if (rx_status_tq->tq == NULL) { - lio_dev_err(oct, "unable to create lio rx oom status tq\n"); - return (-1); - } TIMEOUT_TASK_INIT(rx_status_tq->tq, &rx_status_tq->work, 0, lio_poll_check_rx_oom_status, (void *)rx_status_tq); diff --git a/sys/dev/liquidio/lio_sysctl.c b/sys/dev/liquidio/lio_sysctl.c --- a/sys/dev/liquidio/lio_sysctl.c +++ b/sys/dev/liquidio/lio_sysctl.c @@ -744,9 +744,6 @@ regbuf = malloc(sizeof(char) * LIO_REGDUMP_LEN_XXXX, M_DEVBUF, M_WAITOK | M_ZERO); - if (regbuf == NULL) - return (error); - switch (oct->chip_id) { case LIO_CN23XX_PF_VID: len += lio_cn23xx_pf_read_csr_reg(regbuf, oct); diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c --- a/sys/dev/mxge/if_mxge.c +++ b/sys/dev/mxge/if_mxge.c @@ -4615,10 +4615,6 @@ TASK_INIT(&sc->watchdog_task, 1, mxge_watchdog_task, sc); sc->tq = taskqueue_create("mxge_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->tq); - if (sc->tq == NULL) { - err = ENOMEM; - goto abort_with_nothing; - } err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, /* alignment */ @@ -4815,7 +4811,6 @@ taskqueue_free(sc->tq); sc->tq = NULL; } -abort_with_nothing: return err; }