diff options
author | Bruce Xu <brucex@nvidia.com> | 2019-09-10 03:07:17 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-09-12 14:54:17 -0400 |
commit | bb47dcf2ab38eb0b0206a2dcb3a84696d17791f2 (patch) | |
tree | 62f9432e8ad6258f90c46a73ca76ecd1f0c6c662 /drivers/gpu | |
parent | 0e32642508811c02c64477ca03948dc0cbdd8bfc (diff) |
nvgpu memtest: put memory ref count
after check failed, need release memory reference
Bug 200531152
Change-Id: I6bfad867eb9bd636a48b5ceb3a4417a80994a3ec
Signed-off-by: Bruce Xu <brucex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2194025
(cherry picked from commit f85504ae46d65d5346d9e2a5cc84ffb960ba9fb7)
Reviewed-on: https://git-master.nvidia.com/r/2195437
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/vm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/vm.c b/drivers/gpu/nvgpu/os/linux/vm.c index 97dd0671..27a91cf6 100644 --- a/drivers/gpu/nvgpu/os/linux/vm.c +++ b/drivers/gpu/nvgpu/os/linux/vm.c | |||
@@ -281,6 +281,7 @@ int nvgpu_vm_map_buffer(struct vm_gk20a *vm, | |||
281 | (buffer_offset || *map_addr)) { | 281 | (buffer_offset || *map_addr)) { |
282 | nvgpu_err(g, | 282 | nvgpu_err(g, |
283 | "Regular map with addr/buf offset is not supported!"); | 283 | "Regular map with addr/buf offset is not supported!"); |
284 | dma_buf_put(dmabuf); | ||
284 | return -EINVAL; | 285 | return -EINVAL; |
285 | } | 286 | } |
286 | 287 | ||
@@ -290,6 +291,7 @@ int nvgpu_vm_map_buffer(struct vm_gk20a *vm, | |||
290 | */ | 291 | */ |
291 | if (mapping_size && !(flags & NVGPU_AS_MAP_BUFFER_FLAGS_FIXED_OFFSET)) { | 292 | if (mapping_size && !(flags & NVGPU_AS_MAP_BUFFER_FLAGS_FIXED_OFFSET)) { |
292 | nvgpu_err(g, "map_size && non-fixed-mapping!"); | 293 | nvgpu_err(g, "map_size && non-fixed-mapping!"); |
294 | dma_buf_put(dmabuf); | ||
293 | return -EINVAL; | 295 | return -EINVAL; |
294 | } | 296 | } |
295 | 297 | ||