From 1161b650d72c1bb73fce2632e040ecc9074ba9d0 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Tue, 24 Apr 2018 10:06:19 -0700 Subject: gpu: nvgpu: add NULL check for sim sim pointer is not init for non simulation platforms. Change-Id: Ia30e66efbb009293b4e1151c2f1e4ac5d08c3d78 Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/1701681 Reviewed-by: Alex Waterman Reviewed-by: svc-mobile-coverity Tested-by: Adeel Raza Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index 81b3db82..53c78447 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c @@ -668,7 +668,7 @@ void gk20a_remove_support(struct gk20a *g) if (g->mm.remove_support) g->mm.remove_support(&g->mm); - if (g->sim->remove_support) + if (g->sim && g->sim->remove_support) g->sim->remove_support(g->sim); /* free mappings to registers, etc */ -- cgit v1.2.2