Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev catch attachment fault sooner.
details: https://anonhg.NetBSD.org/src/rev/886e002fdc41
branches: trunk
changeset: 349628:886e002fdc41
user: christos <christos%NetBSD.org@localhost>
date: Fri Dec 16 22:03:10 2016 +0000
description:
catch attachment fault sooner.
diffstat:
sys/dev/audio.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 52e6d9c411d7 -r 886e002fdc41 sys/dev/audio.c
--- a/sys/dev/audio.c Fri Dec 16 20:16:50 2016 +0000
+++ b/sys/dev/audio.c Fri Dec 16 22:03:10 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.280 2016/12/16 16:03:28 christos Exp $ */
+/* $NetBSD: audio.c,v 1.281 2016/12/16 22:03:10 christos Exp $ */
/*-
* Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.280 2016/12/16 16:03:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.281 2016/12/16 22:03:10 christos Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -1432,7 +1432,7 @@
/* First, find the device and take sc_lock. */
sc = device_lookup_private(&audio_cd, AUDIOUNIT(dev));
- if (sc == NULL)
+ if (sc == NULL || sc->hw_if)
return ENXIO;
mutex_enter(sc->sc_lock);
if (sc->sc_dying) {
Home |
Main Index |
Thread Index |
Old Index