Module Name:    src
Committed By:   pgoyette
Date:           Wed Jul 27 03:25:00 UTC 2016

Modified Files:
        src/sys/dev [pgoyette-localcount]: fss.c md.c

Log Message:
Repair the inevitable tyops in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.93.2.4 -r1.93.2.5 src/sys/dev/fss.c
cvs rdiff -u -r1.76.2.4 -r1.76.2.5 src/sys/dev/md.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/fss.c
diff -u src/sys/dev/fss.c:1.93.2.4 src/sys/dev/fss.c:1.93.2.5
--- src/sys/dev/fss.c:1.93.2.4	Wed Jul 27 01:13:50 2016
+++ src/sys/dev/fss.c	Wed Jul 27 03:25:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.93.2.4 2016/07/27 01:13:50 pgoyette Exp $	*/
+/*	$NetBSD: fss.c,v 1.93.2.5 2016/07/27 03:25:00 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.4 2016/07/27 01:13:50 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.5 2016/07/27 03:25:00 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -225,7 +225,7 @@ fss_open(dev_t dev, int flags, int mode,
 		cf->cf_atname = fss_cd.cd_name;
 		cf->cf_unit = minor(dev);
 		cf->cf_fstate = FSTATE_STAR;
-		self = config_attach_pseudo(cf));
+		self = config_attach_pseudo(cf);
 		device_acquire(self);
 		sc = device_private(self);
 		if (sc == NULL) {
@@ -242,7 +242,7 @@ fss_open(dev_t dev, int flags, int mode,
 	mutex_exit(&sc->sc_slock);
 	mutex_exit(&fss_device_lock);
 
-	device_release(sc);
+	device_release(self);
 	return 0;
 }
 

Index: src/sys/dev/md.c
diff -u src/sys/dev/md.c:1.76.2.4 src/sys/dev/md.c:1.76.2.5
--- src/sys/dev/md.c:1.76.2.4	Wed Jul 27 01:13:50 2016
+++ src/sys/dev/md.c	Wed Jul 27 03:25:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.76.2.4 2016/07/27 01:13:50 pgoyette Exp $	*/
+/*	$NetBSD: md.c,v 1.76.2.5 2016/07/27 03:25:00 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.76.2.4 2016/07/27 01:13:50 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.76.2.5 2016/07/27 03:25:00 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_md.h"
@@ -291,7 +291,7 @@ mdopen(dev_t dev, int flag, int fmt, str
 		cf->cf_atname = md_cd.cd_name;
 		cf->cf_unit = unit;
 		cf->cf_fstate = FSTATE_STAR;
-		self = config_attach_pseudo(cf));
+		self = config_attach_pseudo(cf);
 		if (self != NULL) {
 			device_acquire(self);
 			sc = device_private(self);
@@ -465,7 +465,7 @@ mdstrategy(struct buf *bp)
 	}
 
 	sc = device_private(self);
-	if (sc == NULL || sc->sc_type == MD_UNCONFIGURED) {
+	if (sc->sc_type == MD_UNCONFIGURED) {
 		bp->b_error = ENXIO;
 		goto done;
 	}
@@ -515,11 +515,11 @@ mdstrategy(struct buf *bp)
 		break;
 	}
 
- done:
 	mutex_exit(&sc->sc_lock);
-
+ done:
 	biodone(bp);
-	device_release(self);
+	if (self != NULL)
+		device_release(self);
 }
 
 static int

Reply via email to