diff options
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/mfi/mfi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index e2dfacd9a4a47..e46a91606bfa7 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -577,7 +577,7 @@ out: static int mfi_get_log_state(struct mfi_softc *sc, struct mfi_evt_log_state **log_state) { - struct mfi_command *cm; + struct mfi_command *cm = NULL; int error; mtx_lock(&sc->mfi_io_lock); @@ -602,7 +602,8 @@ mfi_get_log_state(struct mfi_softc *sc, struct mfi_evt_log_state **log_state) bus_dmamap_unload(sc->mfi_buffer_dmat, cm->cm_dmamap); out: - mfi_release_command(cm); + if (cm) + mfi_release_command(cm); mtx_unlock(&sc->mfi_io_lock); return (error); @@ -822,6 +823,7 @@ mfi_shutdown(struct mfi_softc *sc) device_printf(sc->mfi_dev, "Failed to shutdown controller\n"); } + mfi_release_command(cm); return (error); } |
