diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pv/xbf.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index 8b5fad22acc..89864b96047 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.15 2017/01/18 22:18:47 mikeb Exp $ */ +/* $OpenBSD: xbf.c,v 1.16 2017/01/19 12:36:50 mikeb Exp $ */ /* * Copyright (c) 2016 Mike Belopuhov @@ -1175,21 +1175,18 @@ xbf_ring_destroy(struct xbf_softc *sc) continue; xbf_scsi_done(sc->sc_xs[i], XS_RESET); } - if (sc->sc_xs) { - free(sc->sc_xs, M_DEVBUF, sc->sc_xr_ndesc * - sizeof(struct scsi_xfer *)); - sc->sc_xs = NULL; - } - if (sc->sc_xs_map) { - free(sc->sc_xs_map, M_DEVBUF, sc->sc_xr_ndesc * - sizeof(bus_dmamap_t)); - sc->sc_xs_map = NULL; - } - if (sc->sc_xs_bb) { - free(sc->sc_xs_bb, M_DEVBUF, sc->sc_xr_ndesc * - sizeof(struct xbf_dma_mem)); - sc->sc_xs_bb = NULL; - } + + free(sc->sc_xs, M_DEVBUF, sc->sc_xr_ndesc * + sizeof(struct scsi_xfer *)); + sc->sc_xs = NULL; + + free(sc->sc_xs_map, M_DEVBUF, sc->sc_xr_ndesc * + sizeof(bus_dmamap_t)); + sc->sc_xs_map = NULL; + + free(sc->sc_xs_bb, M_DEVBUF, sc->sc_xr_ndesc * + sizeof(struct xbf_dma_mem)); + sc->sc_xs_bb = NULL; xbf_dma_free(sc, &sc->sc_xr_dma); |