From 02584da7f35f6b4772754e1c670d351530d3b354 Mon Sep 17 00:00:00 2001 From: Owain Ainsworth Date: Tue, 21 Sep 2010 21:43:44 +0000 Subject: 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. --- sys/dev/pci/drm/i915_drv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sys/dev/pci/drm/i915_drv.c') 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); } -- cgit v1.2.3