summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/perf
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-01-19 18:45:02 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-01-26 13:53:06 -0500
commita2d7dfdfb46d8beeedfd06f780644233c38e8153 (patch)
tree2d0f902131cbe603c9e3170aa258ea81eb824863 /drivers/gpu/nvgpu/perf
parent52ecd593c2fca21bd9d7e88f85267db10b88ceb5 (diff)
gpu: nvgpu: Skip checking for null in error path
vfe_var_construct_single_sensed_fuse() first constructs boardobj and then does further validity checks. If the checks fail, it calls exit label. The exit label checks if boardobj is NULL and calls destructor if it is. As there is no path to get to exit label with boardobj NULL, skip the check. Coverity ID 2011368 Change-Id: Ifea931113a7b862830b4b3f9852d9c16310a1549 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1291685 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/perf')
-rw-r--r--drivers/gpu/nvgpu/perf/vfe_var.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/perf/vfe_var.c b/drivers/gpu/nvgpu/perf/vfe_var.c
index 65ede64a..35061a1f 100644
--- a/drivers/gpu/nvgpu/perf/vfe_var.c
+++ b/drivers/gpu/nvgpu/perf/vfe_var.c
@@ -678,10 +678,9 @@ static u32 vfe_var_construct_single_sensed_fuse(struct gk20a *g,
678 goto exit; 678 goto exit;
679 } 679 }
680exit: 680exit:
681 if (status) { 681 if (status)
682 if (*ppboardobj != NULL) 682 (*ppboardobj)->destruct(*ppboardobj);
683 (*ppboardobj)->destruct(*ppboardobj); 683
684 }
685 return status; 684 return status;
686} 685}
687 686