drm/amdgpu: Fix a NULL deref in amdgpu_vm_add_prt_cb()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 3 Apr 2017 18:41:39 +0000 (21:41 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 4 Apr 2017 18:42:21 +0000 (14:42 -0400)
commit486a68f5449521edf5ea8a198481fc021da4a3e0
tree2be73569bcfa46e2ecae4c7761fc4bfe2960deeb
parent99147e64428b9c3bfcd97e545ae478906c79e6a8
drm/amdgpu: Fix a NULL deref in amdgpu_vm_add_prt_cb()

We accidentally dereference "cb" if the kmalloc() fails.

Fixes: 451bc8eb8fe6 ("drm/amdgpu: fix PRT teardown on VM fini v3")
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c