diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2018-06-21 06:01:14 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-06-21 11:52:55 -0400 |
commit | 90fc8d653fba60a6f7b96e7d91ff02361a3a4890 (patch) | |
tree | bf858d0fe1e9c5df279e5cbd7d182324ecbf8185 /drivers/gpu/nvgpu | |
parent | 00a801a0f2523ec5c8a0e7229d9d51b933bc4431 (diff) |
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>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/channel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/channel.c b/drivers/gpu/nvgpu/os/linux/channel.c index 37e36cb9..391950af 100644 --- a/drivers/gpu/nvgpu/os/linux/channel.c +++ b/drivers/gpu/nvgpu/os/linux/channel.c | |||
@@ -630,7 +630,8 @@ clean_up_post_fence: | |||
630 | gk20a_fence_put(job->post_fence); | 630 | gk20a_fence_put(job->post_fence); |
631 | job->post_fence = NULL; | 631 | job->post_fence = NULL; |
632 | clean_up_wait_cmd: | 632 | clean_up_wait_cmd: |
633 | free_priv_cmdbuf(c, job->wait_cmd); | 633 | if (job->wait_cmd) |
634 | free_priv_cmdbuf(c, job->wait_cmd); | ||
634 | if (!pre_alloc_enabled) | 635 | if (!pre_alloc_enabled) |
635 | job->wait_cmd = NULL; | 636 | job->wait_cmd = NULL; |
636 | fail: | 637 | fail: |