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:
Amurthyreddy
2018-11-13 10:09:42 +05:30
committed by mobile promotions
parent 359a8b82d9
commit b68e465fab
21 changed files with 55 additions and 52 deletions

View File

@@ -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;
}