diff options
author | deischen <deischen@FreeBSD.org> | 2003-10-29 21:54:37 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2003-10-29 21:54:37 +0000 |
commit | e7405e36c19af2fbd59ba156c269a08b15af8f8b (patch) | |
tree | 4e5d57e9605bd6608a1a06726638375170be4936 /sys | |
parent | 96d2efc2200f30a46b25ed877b3c2753fd265ca2 (diff) | |
download | FreeBSD-src-e7405e36c19af2fbd59ba156c269a08b15af8f8b.zip FreeBSD-src-e7405e36c19af2fbd59ba156c269a08b15af8f8b.tar.gz |
Don't attempt to destroy the driver mutex when it hasn't yet
been created. This has been sitting in my local tree for
far too long; I can't believe noone else has come across this
yet.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sound/isa/mpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/sound/isa/mpu.c b/sys/dev/sound/isa/mpu.c index af3909f..5ca32bd 100644 --- a/sys/dev/sound/isa/mpu.c +++ b/sys/dev/sound/isa/mpu.c @@ -362,6 +362,7 @@ mpu_attach(device_t dev) /* Allocate the resources, switch to uart mode. */ if (mpu_allocres(scp, dev) || mpu_uartmode(scp)) { mpu_releaseres(scp, dev); + mtx_destroy(&scp->mtx); return (ENXIO); } @@ -768,7 +769,6 @@ mpu_releaseres(sc_p scp, device_t dev) bus_release_resource(dev, SYS_RES_IOPORT, scp->io_rid, scp->io); scp->io = NULL; } - mtx_destroy(&scp->mtx); } static device_method_t mpu_methods[] = { |