gpu: nvgpu: fix error handling bug

This change fixes error handling logic in
gk20a_alloc_channel_gpfifo(). In cases, where we don't
allocate a channel_sync at gpfifo allocation time,
we shouldn't attempt to destroy it while handling
an error.

Bug 200253447

Change-Id: I57a78c74bbce84fa17fb0360c59b8f413a9124a7
Signed-off-by: Sachit Kadle <skadle@nvidia.com>
Reviewed-on: http://git-master/r/1255858
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Sachit Kadle
2016-11-17 12:57:56 -08:00
committed by mobile promotions
parent c1064c27df
commit 5277ecd79c

View File

@@ -1809,8 +1809,10 @@ clean_up_prealloc:
if (args->num_inflight_jobs)
channel_gk20a_free_prealloc_resources(c);
clean_up_sync:
if (c->sync) {
gk20a_channel_sync_destroy(c->sync);
c->sync = NULL;
}
clean_up_unmap:
nvgpu_free(c->gpfifo.pipe);
gk20a_gmmu_unmap_free(ch_vm, &c->gpfifo.mem);