Rev 3764 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3764 | Rev 4560 | ||
---|---|---|---|
Line 66... | Line 66... | ||
66 | 66 | ||
67 | int drm_global_item_ref(struct drm_global_reference *ref) |
67 | int drm_global_item_ref(struct drm_global_reference *ref) |
68 | { |
68 | { |
69 | int ret; |
69 | int ret; |
70 | struct drm_global_item *item = &glob[ref->global_type]; |
- | |
Line 71... | Line 70... | ||
71 | void *object; |
70 | struct drm_global_item *item = &glob[ref->global_type]; |
72 | 71 | ||
73 | mutex_lock(&item->mutex); |
72 | mutex_lock(&item->mutex); |
74 | if (item->refcount == 0) { |
73 | if (item->refcount == 0) { |
Line 84... | Line 83... | ||
84 | goto out_err; |
83 | goto out_err; |
Line 85... | Line 84... | ||
85 | 84 | ||
86 | } |
85 | } |
87 | ++item->refcount; |
86 | ++item->refcount; |
88 | ref->object = item->object; |
- | |
89 | object = item->object; |
87 | ref->object = item->object; |
90 | mutex_unlock(&item->mutex); |
88 | mutex_unlock(&item->mutex); |
91 | return 0; |
89 | return 0; |
92 | out_err: |
90 | out_err: |
93 | mutex_unlock(&item->mutex); |
91 | mutex_unlock(&item->mutex); |