Author: weongyo
Date: Mon Mar 30 11:51:05 2009
New Revision: 190552
URL: http://svn.freebsd.org/changeset/base/190552

Log:
  when it failed to inform rx/tx dma setup it should clean up allocated
  dma-related buffers and tags.
  
  MFC after:    3 days

Modified:
  head/sys/dev/malo/if_malo.c

Modified: head/sys/dev/malo/if_malo.c
==============================================================================
--- head/sys/dev/malo/if_malo.c Mon Mar 30 11:46:34 2009        (r190551)
+++ head/sys/dev/malo/if_malo.c Mon Mar 30 11:51:05 2009        (r190552)
@@ -260,7 +260,7 @@ malo_attach(uint16_t devid, struct malo_
        }
        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_
        malo_announce(sc);
 
        return 0;
+bad2:
+       malo_dma_cleanup(sc);
 bad1:
        malo_hal_detach(mh);
 bad:
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to