From a2d7dfdfb46d8beeedfd06f780644233c38e8153 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 19 Jan 2017 15:45:02 -0800 Subject: 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 Reviewed-on: http://git-master/r/1291685 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/perf/vfe_var.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/perf') 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, goto exit; } exit: - if (status) { - if (*ppboardobj != NULL) - (*ppboardobj)->destruct(*ppboardobj); - } + if (status) + (*ppboardobj)->destruct(*ppboardobj); + return status; } -- cgit v1.2.2