summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
index 57f7a373..0ff11d09 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
@@ -458,7 +458,9 @@ void gk20a_gmmu_free_attr(struct gk20a *g,
458 458
459static inline phys_addr_t gk20a_mem_phys(struct mem_desc *mem) 459static inline phys_addr_t gk20a_mem_phys(struct mem_desc *mem)
460{ 460{
461 return sg_phys(mem->sgt->sgl); 461 /* the sgt may get null if this is accessed e.g. in an isr during
462 * channel deletion */
463 return mem->sgt ? sg_phys(mem->sgt->sgl) : 0;
462} 464}
463 465
464u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm, 466u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm,