svn commit: r229416 - head/sys/dev/tws

Xin LI delphij at FreeBSD.org
Tue Jan 3 20:17:36 UTC 2012


Author: delphij
Date: Tue Jan  3 20:17:35 2012
New Revision: 229416
URL: http://svn.freebsd.org/changeset/base/229416

Log:
  Don't forget to release queue lock when allocation of memory failed.
  
  Submitted by:	Sascha Wildner <saw online de>
  Obtained from:	DragonFly
  MFC after:	2 weeks

Modified:
  head/sys/dev/tws/tws.c

Modified: head/sys/dev/tws/tws.c
==============================================================================
--- head/sys/dev/tws/tws.c	Tue Jan  3 19:47:32 2012	(r229415)
+++ head/sys/dev/tws/tws.c	Tue Jan  3 20:17:35 2012	(r229416)
@@ -685,6 +685,7 @@ tws_init_reqs(struct tws_softc *sc, u_in
     {
         if (bus_dmamap_create(sc->data_tag, 0, &sc->reqs[i].dma_map)) {
             /* log a ENOMEM failure msg here */
+	    mtx_unlock(&sc->q_lock);
             return(FAILURE);
         } 
         sc->reqs[i].cmd_pkt =  &cmd_buf[i];


More information about the svn-src-head mailing list