projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
506ff75
)
drm/vmwgfx: Make vmw_dmabuf_unreference handle NULL objects
author
Thomas Hellstrom
<
[email protected]
>
Fri, 9 Nov 2012 12:26:15 +0000
(12:26 +0000)
committer
Dave Airlie
<
[email protected]
>
Tue, 20 Nov 2012 06:19:59 +0000
(16:19 +1000)
Signed-off-by: Thomas Hellstrom <
[email protected]
>
Reviewed-by: Brian Paul <
[email protected]
>
Reviewed-by: Dmitry Torokhov <
[email protected]
>
Signed-off-by: Dave Airlie <
[email protected]
>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 88a179e26de90f402f0d8c84a172a107f95517b7..7c6f6e3a3c815305347b0023fcdab12e36d11977 100644
(file)
--- a/
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/
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)