diff --git a/sys/dev/hptiop/hptiop.c b/sys/dev/hptiop/hptiop.c index 83f72c23a6e2..1191718dcae0 100644 --- a/sys/dev/hptiop/hptiop.c +++ b/sys/dev/hptiop/hptiop.c @@ -1642,10 +1642,11 @@ static int hptiop_internal_memalloc_mv(struct hpt_iop_hba *hba) MVIOP_IOCTLCFG_SIZE, hptiop_mv_map_ctlcfg, hba, 0)) { device_printf(hba->pcidev, "bus_dmamap_load failed!\n"); - if (hba->ctlcfg_dmat) + if (hba->ctlcfg_dmat) { bus_dmamem_free(hba->ctlcfg_dmat, hba->ctlcfg_ptr, hba->ctlcfg_dmamap); bus_dma_tag_destroy(hba->ctlcfg_dmat); + } return -1; }