[iwm] Tiny cleanup in iwm_rx_addbuf().

Obtained from:	dragonflybsd.git 3370bc5504ebb3c1b9bb960a185cd0c8052a2845
This commit is contained in:
Adrian Chadd 2017-03-25 02:42:52 +00:00
parent 4aff1c38d1
commit 8d3bbea007

View File

@ -3032,7 +3032,7 @@ iwm_rx_addbuf(struct iwm_softc *sc, int size, int idx)
struct iwm_rx_ring *ring = &sc->rxq;
struct iwm_rx_data *data = &ring->data[idx];
struct mbuf *m;
bus_dmamap_t dmamap = NULL;
bus_dmamap_t dmamap;
bus_dma_segment_t seg;
int nsegs, error;
@ -3046,7 +3046,8 @@ iwm_rx_addbuf(struct iwm_softc *sc, int size, int idx)
if (error != 0) {
device_printf(sc->sc_dev,
"%s: can't map mbuf, error %d\n", __func__, error);
goto fail;
m_freem(m);
return error;
}
if (data->m != NULL)
@ -3067,9 +3068,6 @@ iwm_rx_addbuf(struct iwm_softc *sc, int size, int idx)
BUS_DMASYNC_PREWRITE);
return 0;
fail:
m_freem(m);
return error;
}
/* iwlwifi: mvm/rx.c */