summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2010-09-21 21:43:44 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2010-09-21 21:43:44 +0000
commit02584da7f35f6b4772754e1c670d351530d3b354 (patch)
tree2185aaa8a53ab85fd1ef83c2df0c0ee53463dbde /sys/dev/pci/drm
parent39eff95ee263d1a682cb8667f5e7ea2307be5a0c (diff)
Fix up an unlock that was left over when I changed the locking
requirements of this function (due to no longer binding any objects) Found by matthew@'s lovely lock assertion diff.
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/i915_drv.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c
index 88d87ee7bf6..639545cb51d 100644
--- a/sys/dev/pci/drm/i915_drv.c
+++ b/sys/dev/pci/drm/i915_drv.c
@@ -1397,12 +1397,10 @@ i915_gem_gtt_map_ioctl(struct drm_device *dev, void *data,
UVM_INH_SHARE, UVM_ADV_RANDOM, 0), curproc);
done:
- if (ret != 0)
- drm_unref(&obj->uobj);
- DRM_UNLOCK();
-
if (ret == 0)
args->addr_ptr = (uint64_t) addr + (args->offset & PAGE_MASK);
+ else
+ drm_unref(&obj->uobj);
return (ret);
}