Merge "msm: synx: fix cleanup of fence during handle creation"

This commit is contained in:
qctecmdr 2020-08-19 09:35:25 -07:00 • committed by Gerrit - the friendly Code Review server
commit 65a3cf720f

View file

@ -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);