summaryrefslogtreecommitdiff
path: root/sys/dev/pv
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2017-01-19 12:36:51 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2017-01-19 12:36:51 +0000
commita416a056fff15d472930cf429a7fa0b99d9f1721 (patch)
tree3edd7b1230cc56b86e2fb45e13b46dba89775aae /sys/dev/pv
parentd77b91da1628de336de15105281ab08750187b04 (diff)
No need for conditionals around free(9)
Diffstat (limited to 'sys/dev/pv')
-rw-r--r--sys/dev/pv/xbf.c29
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);