diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2016-08-09 15:50:03 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2016-08-09 15:50:03 +0000 |
commit | 1680b6b1e049e9a4be55cbfc03c7e1689d649dc8 (patch) | |
tree | e41b3db7bd6a3f7e79b3040875bf8fc9423c57fe /sys/dev | |
parent | 5f9e5b5e62cd698d643794f2356af6021c8b05f7 (diff) | |
download | src-1680b6b1e049e9a4be55cbfc03c7e1689d649dc8.tar.gz src-1680b6b1e049e9a4be55cbfc03c7e1689d649dc8.zip |
Remove NULL checks after M_WAITOK allocations from tws(4).
MFC after: 1 month
Notes
Notes:
svn path=/head/; revision=303872
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/tws/tws.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/sys/dev/tws/tws.c b/sys/dev/tws/tws.c index bf9e143c72f5..480f6f954893 100644 --- a/sys/dev/tws/tws.c +++ b/sys/dev/tws/tws.c @@ -606,21 +606,9 @@ tws_init(struct tws_softc *sc) sc->reqs = malloc(sizeof(struct tws_request) * tws_queue_depth, M_TWS, M_WAITOK | M_ZERO); - if ( sc->reqs == NULL ) { - TWS_TRACE_DEBUG(sc, "malloc failed", 0, sc->is64bit); - return(ENOMEM); - } sc->sense_bufs = malloc(sizeof(struct tws_sense) * tws_queue_depth, M_TWS, M_WAITOK | M_ZERO); - if ( sc->sense_bufs == NULL ) { - TWS_TRACE_DEBUG(sc, "sense malloc failed", 0, sc->is64bit); - return(ENOMEM); - } sc->scan_ccb = malloc(sizeof(union ccb), M_TWS, M_WAITOK | M_ZERO); - if ( sc->scan_ccb == NULL ) { - TWS_TRACE_DEBUG(sc, "ccb malloc failed", 0, sc->is64bit); - return(ENOMEM); - } if (bus_dmamem_alloc(sc->data_tag, (void **)&sc->ioctl_data_mem, (BUS_DMA_NOWAIT | BUS_DMA_ZERO), &sc->ioctl_data_map)) { device_printf(sc->tws_dev, "Cannot allocate ioctl data mem\n"); @@ -668,8 +656,6 @@ tws_init_aen_q(struct tws_softc *sc) sc->aen_q.overflow=0; sc->aen_q.q = malloc(sizeof(struct tws_event_packet)*sc->aen_q.depth, M_TWS, M_WAITOK | M_ZERO); - if ( ! sc->aen_q.q ) - return(FAILURE); return(SUCCESS); } @@ -682,8 +668,6 @@ tws_init_trace_q(struct tws_softc *sc) sc->trace_q.overflow=0; sc->trace_q.q = malloc(sizeof(struct tws_trace_rec)*sc->trace_q.depth, M_TWS, M_WAITOK | M_ZERO); - if ( ! sc->trace_q.q ) - return(FAILURE); return(SUCCESS); } |