gpu: nvgpu: MISRA 14.4 boolean fixes

MISRA rule 14.4 doesn't allow the usage of non-boolean variable as
boolean in the controlling expression of an if statement or an
iteration statement.

Fix violations where a non-boolean variable is used as a boolean in the
controlling expression of if and loop statements.

JIRA NVGPU-1022

Change-Id: I61a2d24830428ffc2655bd9c45bb5403c7f22c09
Signed-off-by: Amurthyreddy <amurthyreddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1943058
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Amurthyreddy
2018-11-05 12:23:08 +05:30
committed by mobile promotions
parent 710aab6ba4
commit 1023c6af14
43 changed files with 179 additions and 176 deletions

View File

@@ -1330,7 +1330,7 @@ static struct clk_prog *construct_clk_prog(struct gk20a *g, void *pargs)
}
if (status) {
if (board_obj_ptr) {
if (board_obj_ptr != NULL) {
board_obj_ptr->destruct(board_obj_ptr);
}
return NULL;