diff options
author | weongyo <weongyo@FreeBSD.org> | 2009-03-30 11:51:05 +0000 |
---|---|---|
committer | weongyo <weongyo@FreeBSD.org> | 2009-03-30 11:51:05 +0000 |
commit | e22fff7039c68568eb47a33473d4a3603ddedcd9 (patch) | |
tree | 3a0dddecf2447237836bfbf7a36adf2d25d71882 /sys/dev/malo | |
parent | 5c0371b22a42ef7b48386f5c77a6bb3923f0a732 (diff) | |
download | FreeBSD-src-e22fff7039c68568eb47a33473d4a3603ddedcd9.zip FreeBSD-src-e22fff7039c68568eb47a33473d4a3603ddedcd9.tar.gz |
when it failed to inform rx/tx dma setup it should clean up allocated
dma-related buffers and tags.
MFC after: 3 days
Diffstat (limited to 'sys/dev/malo')
-rw-r--r-- | sys/dev/malo/if_malo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c index 851b841..4e0ae0e 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: |