mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Uninitialized pointer read
Fix the following Coverity Defect: vm_remap.c : Uninitialized pointer read CID 10127932 Bug 3460991 Signed-off-by: Jinesh Parakh <jparakh@nvidia.com> Change-Id: I2de290882aec6a859c5280998e11fb75f3395302 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2708539 Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
bb73cf9597
commit
7d50efb6bc
@@ -43,7 +43,7 @@ int nvgpu_vm_remap_os_buf_get(struct vm_gk20a *vm,
|
||||
struct dma_buf *dmabuf;
|
||||
struct sg_table *sgt = NULL;
|
||||
struct nvgpu_sgt *nv_sgt = NULL;
|
||||
struct dma_buf_attachment *attachment;
|
||||
struct dma_buf_attachment *attachment = NULL;
|
||||
enum nvgpu_aperture aperture;
|
||||
enum dma_data_direction dmabuf_direction;
|
||||
int err = 0;
|
||||
@@ -105,7 +105,7 @@ int nvgpu_vm_remap_os_buf_get(struct vm_gk20a *vm,
|
||||
return 0;
|
||||
|
||||
clean_up:
|
||||
if (IS_ERR(sgt)) {
|
||||
if (!IS_ERR(sgt)) {
|
||||
nvgpu_mm_unpin(dev, dmabuf, attachment, sgt);
|
||||
}
|
||||
dma_buf_put(dmabuf);
|
||||
|
||||
Reference in New Issue
Block a user