summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-11-17 13:47:26 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-17 13:47:50 -0800
commit14c05aa399e30f343f25158c9adfc44631378a96 (patch)
tree9ee42af7327555673132cd3cff73449e5392ed2d /drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
parent319684b1cd15f24120b9513b38a949539c0b7938 (diff)
parente53beacd23d9cb47590da6a7a7f6d417b941a994 (diff)
downloadtalos-op-linux-14c05aa399e30f343f25158c9adfc44631378a96.tar.gz
talos-op-linux-14c05aa399e30f343f25158c9adfc44631378a96.zip
Driver core: Merge 2.6.37-rc2 into driver-core-next
This resolves some build issues that were present in the older -rc1 tree that kept bothering me. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_kms.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_kms.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 87c6e6156d7d..cceeb42789b6 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -720,6 +720,8 @@ static int vmw_surface_dmabuf_pin(struct vmw_framebuffer *vfb)
&vmw_vram_ne_placement,
false, &vmw_dmabuf_bo_free);
vmw_overlay_resume_all(dev_priv);
+ if (unlikely(ret != 0))
+ vfbs->buffer = NULL;
return ret;
}
@@ -730,6 +732,9 @@ static int vmw_surface_dmabuf_unpin(struct vmw_framebuffer *vfb)
struct vmw_framebuffer_surface *vfbs =
vmw_framebuffer_to_vfbs(&vfb->base);
+ if (unlikely(vfbs->buffer == NULL))
+ return 0;
+
bo = &vfbs->buffer->base;
ttm_bo_unref(&bo);
vfbs->buffer = NULL;
OpenPOWER on IntegriCloud