mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
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>
This commit is contained in:
committed by
Terje Bergstrom
parent
439d5939d4
commit
e689d62d88
@@ -115,8 +115,10 @@ static int gk20a_channel_syncpt_wait_fd(struct gk20a_channel_sync *s, int fd,
|
||||
}
|
||||
|
||||
num_wait_cmds = nvhost_sync_num_pts(sync_fence);
|
||||
if (num_wait_cmds == 0)
|
||||
if (num_wait_cmds == 0) {
|
||||
sync_fence_put(sync_fence);
|
||||
return 0;
|
||||
}
|
||||
|
||||
err = gk20a_channel_alloc_priv_cmdbuf(c, 4 * num_wait_cmds, &wait_cmd);
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user