diff options
author | Yunbo Wang <yunbow@nvidia.com> | 2016-03-11 18:00:14 -0500 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-03-14 22:44:20 -0400 |
commit | e689d62d88e30a7f3032ce67e425dd98fc485810 (patch) | |
tree | e4f6c7480fc25d03d548c35d1901e11980bbeb16 /drivers/gpu/nvgpu/gk20a | |
parent | 439d5939d4633171223ee58263e9cca919d30f2a (diff) |
gpu: nvgpu: fix a sync_fence leak
Fixes a bug where reference to sync_fence is not closed before return.
Bug 200171146
Change-Id: If174eb124bd69692bab4cc8629a103517d7cfef1
Signed-off-by: Yunbo Wang <yunbow@nvidia.com>
Reviewed-on: http://git-master/r/1029844
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Eric Miao <emiao@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 8ff53d17..87f0bf74 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -115,8 +115,10 @@ static int gk20a_channel_syncpt_wait_fd(struct gk20a_channel_sync *s, int fd, | |||
115 | } | 115 | } |
116 | 116 | ||
117 | num_wait_cmds = nvhost_sync_num_pts(sync_fence); | 117 | num_wait_cmds = nvhost_sync_num_pts(sync_fence); |
118 | if (num_wait_cmds == 0) | 118 | if (num_wait_cmds == 0) { |
119 | sync_fence_put(sync_fence); | ||
119 | return 0; | 120 | return 0; |
121 | } | ||
120 | 122 | ||
121 | err = gk20a_channel_alloc_priv_cmdbuf(c, 4 * num_wait_cmds, &wait_cmd); | 123 | err = gk20a_channel_alloc_priv_cmdbuf(c, 4 * num_wait_cmds, &wait_cmd); |
122 | if (err) { | 124 | if (err) { |