summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-01-19 18:40:49 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-01-26 13:53:06 -0500
commit52ecd593c2fca21bd9d7e88f85267db10b88ceb5 (patch)
tree99b59567b546539c7bfe798349dddd4a0d944335 /drivers/gpu/nvgpu/clk
parent8fa68aeb045e8974a295a6d1f7d30f127398a8d2 (diff)
gpu: nvgpu: Skip checking for null in error path
clk_prog_construct_1x_master_table() first constructs boardobj and then allocates further structures. If the further allocation fails, 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 2011367 Change-Id: Ic157397ca42d26b7640f7b28f6a9fb929d517412 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1291684 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/clk')
-rw-r--r--drivers/gpu/nvgpu/clk/clk_prog.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_prog.c b/drivers/gpu/nvgpu/clk/clk_prog.c
index b8c8d9a2..4135f767 100644
--- a/drivers/gpu/nvgpu/clk/clk_prog.c
+++ b/drivers/gpu/nvgpu/clk/clk_prog.c
@@ -718,10 +718,9 @@ static u32 clk_prog_construct_1x_master_table(struct gk20a *g,
718 memcpy(pclkprog->p_slave_entries, ptmpprog->p_slave_entries, slavesize); 718 memcpy(pclkprog->p_slave_entries, ptmpprog->p_slave_entries, slavesize);
719 719
720exit: 720exit:
721 if (status) { 721 if (status)
722 if (*ppboardobj != NULL) 722 (*ppboardobj)->destruct(*ppboardobj);
723 (*ppboardobj)->destruct(*ppboardobj); 723
724 }
725 return status; 724 return status;
726} 725}
727 726