diff options
author | Seema Khowala <seemaj@nvidia.com> | 2018-04-24 13:06:19 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-04-26 20:57:31 -0400 |
commit | 1161b650d72c1bb73fce2632e040ecc9074ba9d0 (patch) | |
tree | e58c031155886e2084e35733c3679f51340905c5 | |
parent | 9fa77a1c05bf01f253b5118c283086fea2eca1de (diff) |
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>
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/module.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
668 | if (g->mm.remove_support) | 668 | if (g->mm.remove_support) |
669 | g->mm.remove_support(&g->mm); | 669 | g->mm.remove_support(&g->mm); |
670 | 670 | ||
671 | if (g->sim->remove_support) | 671 | if (g->sim && g->sim->remove_support) |
672 | g->sim->remove_support(g->sim); | 672 | g->sim->remove_support(g->sim); |
673 | 673 | ||
674 | /* free mappings to registers, etc */ | 674 | /* free mappings to registers, etc */ |