mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
Merge "msm: kgsl: Initialize fence only if it gets refcount on timeline"
This commit is contained in:
commit
20fa22472d
1 changed files with 4 additions and 0 deletions
|
|
@ -299,6 +299,10 @@ struct dma_fence *kgsl_timeline_fence_alloc(struct kgsl_timeline *timeline,
|
|||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
fence->timeline = kgsl_timeline_get(timeline);
|
||||
if (!fence->timeline) {
|
||||
kfree(fence);
|
||||
return ERR_PTR(-ENOENT);
|
||||
}
|
||||
|
||||
dma_fence_init(&fence->base, &timeline_fence_ops,
|
||||
&timeline->lock, timeline->context, seqno);
|
||||
|
|
|
|||
Loading…
Reference in a new issue