Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269718
b: refs/heads/master
c: e93daed
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Hellstrom authored and Dave Airlie committed Oct 5, 2011
1 parent fcd9183 commit 92954cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b37a6b9ad002a6c123a6924668dfef5c5fb0b700
refs/heads/master: e93daed8e2fd5ce3dc98efe9938426127a534ccc
9 changes: 8 additions & 1 deletion trunk/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ static int vmw_fence_obj_init(struct vmw_fence_manager *fman,

struct vmw_fence_obj *vmw_fence_obj_reference(struct vmw_fence_obj *fence)
{
if (unlikely(fence == NULL))
return NULL;

kref_get(&fence->kref);
return fence;
}
Expand All @@ -191,8 +194,12 @@ struct vmw_fence_obj *vmw_fence_obj_reference(struct vmw_fence_obj *fence)
void vmw_fence_obj_unreference(struct vmw_fence_obj **fence_p)
{
struct vmw_fence_obj *fence = *fence_p;
struct vmw_fence_manager *fman = fence->fman;
struct vmw_fence_manager *fman;

if (unlikely(fence == NULL))
return;

fman = fence->fman;
*fence_p = NULL;
spin_lock_irq(&fman->lock);
BUG_ON(atomic_read(&fence->kref.refcount) == 0);
Expand Down

0 comments on commit 92954cd

Please sign in to comment.