mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: only free wait_cmd if it exists
gk20a_submit_prepare_syncs can fall to error handling paths without an allocated wait command buffer. In that case, just don't try to free the null wait_cmd; the user never requested one. Change-Id: Ice9041c0efa9bb14cde917e7ea82f4a7b6bf537c Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1756829 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sami Kiminki <skiminki@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
00a801a0f2
commit
90fc8d653f
@@ -630,7 +630,8 @@ clean_up_post_fence:
|
||||
gk20a_fence_put(job->post_fence);
|
||||
job->post_fence = NULL;
|
||||
clean_up_wait_cmd:
|
||||
free_priv_cmdbuf(c, job->wait_cmd);
|
||||
if (job->wait_cmd)
|
||||
free_priv_cmdbuf(c, job->wait_cmd);
|
||||
if (!pre_alloc_enabled)
|
||||
job->wait_cmd = NULL;
|
||||
fail:
|
||||
|
||||
Reference in New Issue
Block a user