mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
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
This commit is contained in:
committed by
mobile promotions
parent
8fa68aeb04
commit
52ecd593c2
@@ -718,10 +718,9 @@ static u32 clk_prog_construct_1x_master_table(struct gk20a *g,
|
|||||||
memcpy(pclkprog->p_slave_entries, ptmpprog->p_slave_entries, slavesize);
|
memcpy(pclkprog->p_slave_entries, ptmpprog->p_slave_entries, slavesize);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
if (status) {
|
if (status)
|
||||||
if (*ppboardobj != NULL)
|
(*ppboardobj)->destruct(*ppboardobj);
|
||||||
(*ppboardobj)->destruct(*ppboardobj);
|
|
||||||
}
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user