diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2015-11-19 03:56:15 -0500 |
---|---|---|
committer | Sachin Nikam <snikam@nvidia.com> | 2015-11-25 03:45:58 -0500 |
commit | 10f6da09eb6fffea2d50c8fe4634e0d5f8226d7d (patch) | |
tree | 4141867911601aed374dba50b031cb5aa5d9e9d3 /drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |
parent | 836027806dab4a59c0faadca4f530371ef5869d0 (diff) |
gpu: nvgpu: fix Coverity issues
- operands not affecting result (id = 12845)
- logically dead code (id = 12890)
- dereference after null check (id = 12968)
- unsigned compared to 0 (id = 13176)
- resource leak (id = 13338, 18673)
- unused pointer value (id = 13916)
Bug 1703084
Change-Id: I2f401dd93126af27748c53fa1b3a59cb154af36b
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/835143
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 4c31d5e4..4bc8d385 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -1735,7 +1735,7 @@ int gk20a_vm_get_compbits_info(struct vm_gk20a *vm, | |||
1735 | 1735 | ||
1736 | mapped_buffer = find_mapped_buffer_locked(&vm->mapped_buffers, mapping_gva); | 1736 | mapped_buffer = find_mapped_buffer_locked(&vm->mapped_buffers, mapping_gva); |
1737 | 1737 | ||
1738 | if (!mapped_buffer | !mapped_buffer->user_mapped) | 1738 | if (!mapped_buffer || !mapped_buffer->user_mapped) |
1739 | { | 1739 | { |
1740 | mutex_unlock(&vm->update_gmmu_lock); | 1740 | mutex_unlock(&vm->update_gmmu_lock); |
1741 | gk20a_err(d, "%s: bad offset 0x%llx", __func__, mapping_gva); | 1741 | gk20a_err(d, "%s: bad offset 0x%llx", __func__, mapping_gva); |