From 85575c91f2be72173cf01be9d14efd9a5908eed7 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Fri, 9 Nov 2012 12:26:15 +0000 Subject: [PATCH] --- yaml --- r: 345351 b: refs/heads/master c: bf6f036848ab2151c2498f11cb7d31a52a95dd5c h: refs/heads/master i: 345349: dea84d3d7e145b96a81f30f91e874faf99b54241 345347: be8c2d314f1e5434144c2983f8a01d2bfa425b01 345343: b8d0a94533e8a45f425899b66391367c86b375e7 v: v3 --- [refs] | 2 +- trunk/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index ac9031371b41..83194f0c05ce 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 506ff75c92a44d80da96bc18d9902d29e8236fc6 +refs/heads/master: bf6f036848ab2151c2498f11cb7d31a52a95dd5c diff --git a/trunk/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/trunk/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h index 88a179e26de9..7c6f6e3a3c81 100644 --- a/trunk/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +++ b/trunk/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h @@ -699,10 +699,13 @@ static inline struct vmw_surface *vmw_surface_reference(struct vmw_surface *srf) static inline void vmw_dmabuf_unreference(struct vmw_dma_buffer **buf) { struct vmw_dma_buffer *tmp_buf = *buf; - struct ttm_buffer_object *bo = &tmp_buf->base; + *buf = NULL; + if (tmp_buf != NULL) { + struct ttm_buffer_object *bo = &tmp_buf->base; - ttm_bo_unref(&bo); + ttm_bo_unref(&bo); + } } static inline struct vmw_dma_buffer *vmw_dmabuf_reference(struct vmw_dma_buffer *buf)