diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c index 851b8411b28f..4e0ae0e06069 100644 --- a/sys/dev/malo/if_malo.c +++ b/sys/dev/malo/if_malo.c @@ -260,7 +260,7 @@ malo_attach(uint16_t devid, struct malo_softc *sc) } error = malo_setup_hwdma(sc); /* push to firmware */ if (error != 0) /* NB: malo_setupdma prints msg */ - goto bad1; + goto bad2; sc->malo_tq = taskqueue_create_fast("malo_taskq", M_NOWAIT, taskqueue_thread_enqueue, &sc->malo_tq); @@ -329,6 +329,8 @@ malo_attach(uint16_t devid, struct malo_softc *sc) malo_announce(sc); return 0; +bad2: + malo_dma_cleanup(sc); bad1: malo_hal_detach(mh); bad: