mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +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: Ia2ec5f1db3c7a1884efe5ba7b8b4d9ebbd021734 Signed-off-by: Amurthyreddy <amurthyreddy@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1921373 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
bc379d5eed
commit
88d21daedb
@@ -164,13 +164,13 @@ static int issue_rpc_and_wait(struct gk20a *g)
|
||||
int err;
|
||||
|
||||
err = rpc_send_message(g);
|
||||
if (err) {
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "failed rpc_send_message");
|
||||
return err;
|
||||
}
|
||||
|
||||
err = rpc_recv_poll(g);
|
||||
if (err) {
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "failed rpc_recv_poll");
|
||||
return err;
|
||||
}
|
||||
@@ -263,7 +263,7 @@ int nvgpu_init_sim_support_pci(struct gk20a *g)
|
||||
err = err || nvgpu_alloc_sim_buffer(g, &g->sim->recv_bfr);
|
||||
err = err || nvgpu_alloc_sim_buffer(g, &g->sim->msg_bfr);
|
||||
|
||||
if (err)
|
||||
if (err != 0)
|
||||
goto fail;
|
||||
|
||||
g->sim->sim_init_late = nvgpu_sim_init_late;
|
||||
|
||||
Reference in New Issue
Block a user