mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: MISRA 14.4 err/ret/status as boolean
MISRA rule 14.4 doesn't allow the usage of integer types as booleans in the controlling expression of an if statement or an iteration statement. Fix violations where the integer variables err, ret, status are used as booleans in the controlling expression of if and loop statements. JIRA NVGPU-1019 Change-Id: I36494e84ee6cd4a108e2a539f48f102e47e2f7f4 Signed-off-by: Amurthyreddy <amurthyreddy@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1926820 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
d6a9b1dae1
commit
3e6779d554
@@ -63,7 +63,7 @@ static int _pwr_domains_pmudatainit_ina3221(struct gk20a *g,
|
||||
u32 indx;
|
||||
|
||||
status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata);
|
||||
if (status) {
|
||||
if (status != 0) {
|
||||
nvgpu_err(g,
|
||||
"error updating pmu boardobjgrp for pwr domain 0x%x",
|
||||
status);
|
||||
@@ -101,7 +101,7 @@ static struct boardobj *construct_pwr_device(struct gk20a *g,
|
||||
|
||||
status = boardobj_construct_super(g, &board_obj_ptr,
|
||||
pargs_size, pargs);
|
||||
if (status) {
|
||||
if (status != 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ static int devinit_get_pwr_device_table(struct gk20a *g,
|
||||
status = boardobjgrp_objinsert(&ppwrdeviceobjs->super.super,
|
||||
boardobj, obj_index);
|
||||
|
||||
if (status) {
|
||||
if (status != 0) {
|
||||
nvgpu_err(g,
|
||||
"unable to insert pwr device boardobj for %d", index);
|
||||
status = -EINVAL;
|
||||
@@ -296,7 +296,7 @@ int pmgr_device_sw_setup(struct gk20a *g)
|
||||
|
||||
/* Construct the Super Class and override the Interfaces */
|
||||
status = boardobjgrpconstruct_e32(g, &g->pmgr_pmu.pmgr_deviceobjs.super);
|
||||
if (status) {
|
||||
if (status != 0) {
|
||||
nvgpu_err(g,
|
||||
"error creating boardobjgrp for pmgr devices, status - 0x%x",
|
||||
status);
|
||||
@@ -310,7 +310,7 @@ int pmgr_device_sw_setup(struct gk20a *g)
|
||||
pboardobjgrp->pmudatainstget = _pwr_device_pmudata_instget;
|
||||
|
||||
status = devinit_get_pwr_device_table(g, ppwrdeviceobjs);
|
||||
if (status) {
|
||||
if (status != 0) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user