From a8afa823f9637687758d68ab3c9f445b85dc63e3 Mon Sep 17 00:00:00 2001 From: Nicolas Benech Date: Thu, 5 Sep 2019 14:36:54 -0400 Subject: [PATCH] gpu: nvgpu: change nvgpu_init_mm_reset_enable_hw to return void The nvgpu_init_mm_reset_enable_hw was always returning 0. This patch changes it to return void instead which removes some useless error checking. JIRA NVGPU-3650 Change-Id: I34ddfb63384f4dbf9e682660f9951c11e5204418 Signed-off-by: Nicolas Benech Reviewed-on: https://git-master.nvidia.com/r/2191098 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/mm/mm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/nvgpu/common/mm/mm.c b/drivers/gpu/nvgpu/common/mm/mm.c index 266e5ec98..410267d5b 100644 --- a/drivers/gpu/nvgpu/common/mm/mm.c +++ b/drivers/gpu/nvgpu/common/mm/mm.c @@ -320,7 +320,7 @@ void nvgpu_init_mm_ce_context(struct gk20a *g) } #endif -static int nvgpu_init_mm_reset_enable_hw(struct gk20a *g) +static void nvgpu_init_mm_reset_enable_hw(struct gk20a *g) { if (g->ops.mc.fb_reset != NULL) { g->ops.mc.fb_reset(g); @@ -333,8 +333,6 @@ static int nvgpu_init_mm_reset_enable_hw(struct gk20a *g) if (g->ops.fb.init_fs_state != NULL) { g->ops.fb.init_fs_state(g); } - - return 0; } static int nvgpu_init_bar1_vm(struct mm_gk20a *mm) @@ -604,10 +602,7 @@ int nvgpu_init_mm_support(struct gk20a *g) { int err; - err = nvgpu_init_mm_reset_enable_hw(g); - if (err != 0) { - return err; - } + nvgpu_init_mm_reset_enable_hw(g); err = nvgpu_init_mm_pdb_cache_war(g); if (err != 0) {