]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/gpu/drm/nouveau/nv50_fence.c
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-bionic-kernel.git] / drivers / gpu / drm / nouveau / nv50_fence.c
index e0763ea88ee273661e6b70d1f83c5a3fe5c84f91..c20f2727ea0ba2d114699aaf2df56416e9794729 100644 (file)
@@ -110,8 +110,11 @@ nv50_fence_create(struct nouveau_drm *drm)
                             0, 0x0000, NULL, &priv->bo);
        if (!ret) {
                ret = nouveau_bo_pin(priv->bo, TTM_PL_FLAG_VRAM);
-               if (!ret)
+               if (!ret) {
                        ret = nouveau_bo_map(priv->bo);
+                       if (ret)
+                               nouveau_bo_unpin(priv->bo);
+               }
                if (ret)
                        nouveau_bo_ref(NULL, &priv->bo);
        }