diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2016-10-12 03:21:02 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-10-26 12:44:44 -0400 |
commit | d96ff67fb02107e11d007f6144db85e8f2da4a24 (patch) | |
tree | c45095e4b593d6de9605c5029e5fc79a95f283dc /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | eca45ed722cd9eaf73edf934e9e3611d0211fb24 (diff) |
gpu: nvgpu: fix prealloc resource alloc error handling
Only free the per-channel preallocated job-tracking resources during
channel allocation error path if they have actually been allocated.
Bug 1795076
Change-Id: I2de90504f1042ce372337b68c5405727b4e4abb4
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1234983
(cherry picked from commit 62cb75c6baa02d0edecd1f81f1b8b80a985fd715)
Reviewed-on: http://git-master/r/1238329
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sami Kiminki <skiminki@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index f839bfbc..7481e747 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -1802,7 +1802,8 @@ int gk20a_alloc_channel_gpfifo(struct channel_gk20a *c, | |||
1802 | clean_up_priv_cmd: | 1802 | clean_up_priv_cmd: |
1803 | channel_gk20a_free_priv_cmdbuf(c); | 1803 | channel_gk20a_free_priv_cmdbuf(c); |
1804 | clean_up_prealloc: | 1804 | clean_up_prealloc: |
1805 | channel_gk20a_free_prealloc_resources(c); | 1805 | if (args->num_inflight_jobs) |
1806 | channel_gk20a_free_prealloc_resources(c); | ||
1806 | clean_up_sync: | 1807 | clean_up_sync: |
1807 | gk20a_channel_sync_destroy(c->sync); | 1808 | gk20a_channel_sync_destroy(c->sync); |
1808 | c->sync = NULL; | 1809 | c->sync = NULL; |