mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
msm: synx: fix cleanup of fence during handle creation
Change removes the registered callback with the dma fence if the handle allocation fails. This is explicitly needed as any pending callbacks in the fence results in a warning during destruction. Fix avoids such warning. Change-Id: I1b5de820789d608231f7b5a9064bb1f0261d553e Signed-off-by: Sumukh Hallymysore Ravindra <shallymy@codeaurora.org>
This commit is contained in:
parent
55d1e41a78
commit
e903f12adc
1 changed files with 7 additions and 2 deletions
|
|
@ -163,7 +163,7 @@ int synx_create(struct synx_session session_id,
|
|||
if (rc) {
|
||||
pr_err("[sess: %u] error initializing synx obj\n",
|
||||
client->id);
|
||||
goto clean_up;
|
||||
goto clear;
|
||||
}
|
||||
|
||||
rc = synx_util_init_handle(client, synx_obj, &h_synx);
|
||||
|
|
@ -180,7 +180,12 @@ int synx_create(struct synx_session session_id,
|
|||
return 0;
|
||||
|
||||
clean_up:
|
||||
dma_fence_put(synx_obj->fence);
|
||||
if (!synx_util_is_external_object(synx_obj)) {
|
||||
dma_fence_remove_callback(synx_obj->fence,
|
||||
&synx_obj->fence_cb);
|
||||
dma_fence_put(synx_obj->fence);
|
||||
}
|
||||
clear:
|
||||
kfree(synx_obj);
|
||||
fail:
|
||||
synx_put_client(client);
|
||||
|
|
|
|||
Loading…
Reference in a new issue