fix critical-section mismatch
authorYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Fri, 13 Apr 2007 02:51:34 +0000 (02:51 +0000)
committerYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Fri, 13 Apr 2007 02:51:34 +0000 (02:51 +0000)
sys/dev/raid/mly/mly.c

index 1cf6ca9..214b883 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/dev/mly/mly.c,v 1.3.2.3 2001/03/05 20:17:24 msmith Exp $
- *     $DragonFly: src/sys/dev/raid/mly/mly.c,v 1.17 2006/12/22 23:26:24 swildner Exp $
+ *     $DragonFly: src/sys/dev/raid/mly/mly.c,v 1.18 2007/04/13 02:51:34 y0netan1 Exp $
  */
 
 #include <sys/param.h>
@@ -820,8 +820,10 @@ mly_immediate_command(struct mly_command *mc)
 
     /* spinning at splcam is ugly, but we're only used during controller init */
     crit_enter();
-    if ((error = mly_start(mc)))
+    if ((error = mly_start(mc))) {
+       crit_exit();
        return(error);
+    }
 
     if (sc->mly_state & MLY_STATE_INTERRUPTS_ON) {
        /* sleep on the command */