drm/nouveau: fix missing spin_unlock in failure path
authorLuca Barbieri <luca@luca-barbieri.com>
Sat, 20 Feb 2010 10:08:56 +0000 (11:08 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 25 Feb 2010 05:09:13 +0000 (15:09 +1000)
Found by sparse.

Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_gem.c

index fee959c72f40a0b9d8a70e8114f42835a339c023..8265fed528fde8dd67f75b364cb52b82d6b43ecb 100644 (file)
@@ -558,11 +558,11 @@ nouveau_gem_pushbuf_reloc_apply(struct drm_device *dev,
 
                spin_lock(&nvbo->bo.lock);
                ret = ttm_bo_wait(&nvbo->bo, false, false, false);
+               spin_unlock(&nvbo->bo.lock);
                if (ret) {
                        NV_ERROR(dev, "reloc wait_idle failed: %d\n", ret);
                        break;
                }
-               spin_unlock(&nvbo->bo.lock);
 
                nouveau_bo_wr32(nvbo, r->reloc_bo_offset >> 2, data);
        }