mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: MISRA 10.1 boolean fixes
MISRA rule 10.1 doesn't allow the usage of non-boolean variables as booleans. Fix violations where a variable of type non-boolean is used as a boolean. JIRA NVGPU-646 Change-Id: If451037ada9a5f41b0cddb50778de57f60864f5c Signed-off-by: Amurthyreddy <amurthyreddy@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1815742 GVS: Gerrit_Virtual_Submit Reviewed-by: Adeel Raza <araza@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
359a8b82d9
commit
b68e465fab
@@ -1125,7 +1125,7 @@ static int clk_prog_construct_1x_master_ratio(struct gk20a *g,
|
||||
pclkprog->p_slave_entries =
|
||||
(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry *)
|
||||
nvgpu_kzalloc(g, slavesize);
|
||||
if (!pclkprog->p_slave_entries) {
|
||||
if (pclkprog->p_slave_entries == NULL) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -1214,7 +1214,7 @@ static int clk_prog_construct_1x_master_table(struct gk20a *g,
|
||||
(struct ctrl_clk_clk_prog_1x_master_table_slave_entry *)
|
||||
nvgpu_kzalloc(g, slavesize);
|
||||
|
||||
if (!pclkprog->p_slave_entries) {
|
||||
if (pclkprog->p_slave_entries == NULL) {
|
||||
status = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user