Source-Changes-HG archive

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

[src/trunk]: src/sys/dev release lock in error branch



details:   https://anonhg.NetBSD.org/src/rev/908d97413f39
branches:  trunk
changeset: 754010:908d97413f39
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Apr 16 11:22:43 2010 +0000

description:
release lock in error branch

diffstat:

 sys/dev/fss.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 3c44a1362a78 -r 908d97413f39 sys/dev/fss.c
--- a/sys/dev/fss.c     Fri Apr 16 11:05:37 2010 +0000
+++ b/sys/dev/fss.c     Fri Apr 16 11:22:43 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fss.c,v 1.68 2010/04/13 07:58:54 hannken Exp $ */
+/*     $NetBSD: fss.c,v 1.69 2010/04/16 11:22:43 pooka Exp $   */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.68 2010/04/13 07:58:54 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.69 2010/04/16 11:22:43 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -196,8 +196,10 @@
                cf->cf_unit = minor(dev);
                cf->cf_fstate = FSTATE_STAR;
                sc = device_private(config_attach_pseudo(cf));
-               if (sc == NULL)
+               if (sc == NULL) {
+                       mutex_exit(&fss_device_lock);
                        return ENOMEM;
+               }
        }
 
        mutex_enter(&sc->sc_slock);



Home | Main Index | Thread Index | Old Index