Plug three lock leaks.
This commit is contained in:
parent
2c75faf3d9
commit
27d8bee2a7
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user