Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb fix missing mutex_exit in error path of ohci_wai...



details:   https://anonhg.NetBSD.org/src/rev/96e982d091ed
branches:  trunk
changeset: 783942:96e982d091ed
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Jan 13 01:10:59 2013 +0000

description:
fix missing mutex_exit in error path of ohci_waitintr

diffstat:

 sys/dev/usb/ohci.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r a4511c5da71d -r 96e982d091ed sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Sun Jan 13 01:04:46 2013 +0000
+++ b/sys/dev/usb/ohci.c        Sun Jan 13 01:10:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.229 2013/01/05 23:34:18 christos Exp $      */
+/*     $NetBSD: ohci.c,v 1.230 2013/01/13 01:10:59 jmcneill Exp $      */
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.229 2013/01/05 23:34:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.230 2013/01/13 01:10:59 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1667,7 +1667,7 @@
                        ohci_intr1(sc);
                        mutex_spin_exit(&sc->sc_intr_lock);
                        if (xfer->status != USBD_IN_PROGRESS)
-                               return;
+                               goto done;
                }
        }
 
@@ -1678,6 +1678,7 @@
 
        /* XXX should free TD */
 
+done:
        mutex_exit(&sc->sc_lock);
 }
 



Home | Main Index | Thread Index | Old Index