aboutsummaryrefslogtreecommitdiff
path: root/sys/pci
diff options
context:
space:
mode:
authorMaxime Henrion <mux@FreeBSD.org>2004-05-22 00:44:08 +0000
committerMaxime Henrion <mux@FreeBSD.org>2004-05-22 00:44:08 +0000
commit27d8bee2a7ebf082e9a698114b8ff6ffd738a47c (patch)
tree59af537f377d086f32a7b973cc7666f8d8991c1c /sys/pci
parent2c75faf3d9d715ce8af029b0810deb3502a39bfd (diff)
downloadsrc-27d8bee2a7ebf082e9a698114b8ff6ffd738a47c.tar.gz
src-27d8bee2a7ebf082e9a698114b8ff6ffd738a47c.zip
Plug three lock leaks.
Notes
Notes: svn path=/head/; revision=129567
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/agp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/pci/agp.c b/sys/pci/agp.c
index f507aa626fcd..03d59373cd88 100644
--- a/sys/pci/agp.c
+++ b/sys/pci/agp.c
@@ -493,6 +493,7 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem,
if (mem->am_is_bound) {
device_printf(dev, "memory already bound\n");
+ lockmgr(&sc->as_lock, LK_RELEASE, 0, curthread);
return EINVAL;
}
@@ -501,6 +502,7 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem,
|| offset + mem->am_size > AGP_GET_APERTURE(dev)) {
device_printf(dev, "binding memory at bad offset %#x\n",
(int) offset);
+ lockmgr(&sc->as_lock, LK_RELEASE, 0, curthread);
return EINVAL;
}
@@ -596,6 +598,7 @@ agp_generic_unbind_memory(device_t dev, struct agp_memory *mem)
if (!mem->am_is_bound) {
device_printf(dev, "memory is not bound\n");
+ lockmgr(&sc->as_lock, LK_RELEASE, 0, curthread);
return EINVAL;
}