gpu: nvgpu: add NULL check for sim

sim pointer is not init for non simulation
platforms.

Change-Id: Ia30e66efbb009293b4e1151c2f1e4ac5d08c3d78
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1701681
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Tested-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Seema Khowala
2018-04-24 10:06:19 -07:00
committed by mobile promotions
parent 9fa77a1c05
commit 1161b650d7

View File

@@ -668,7 +668,7 @@ void gk20a_remove_support(struct gk20a *g)
if (g->mm.remove_support) if (g->mm.remove_support)
g->mm.remove_support(&g->mm); g->mm.remove_support(&g->mm);
if (g->sim->remove_support) if (g->sim && g->sim->remove_support)
g->sim->remove_support(g->sim); g->sim->remove_support(g->sim);
/* free mappings to registers, etc */ /* free mappings to registers, etc */