summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJunwei Zhang <Jerry.Zhang@amd.com>2018-05-11 14:54:31 +0800
committerAlex Deucher <alexander.deucher@amd.com>2018-05-15 13:44:25 -0500
commitc430bc977059a73758f666da545bc16c759fc165 (patch)
treedba6a112967a729af0d7b2f8ef32f553cc437a35 /drivers
parent323a9dbc452da5c155e5c17fe91c07093824fe27 (diff)
drm/amdgpu: fix null pointer for bo unmap trace function
fix crash in trace. Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
index 532263ab6e16..e96e26d3f3b0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
@@ -275,7 +275,7 @@ TRACE_EVENT(amdgpu_vm_bo_unmap,
),
TP_fast_assign(
- __entry->bo = bo_va->base.bo;
+ __entry->bo = bo_va ? bo_va->base.bo : NULL;
__entry->start = mapping->start;
__entry->last = mapping->last;
__entry->offset = mapping->offset;