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: 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
@@ -539,7 +539,7 @@ static int channel_sync_semaphore_incr_common(
|
||||
|
||||
incr_cmd_size = c->g->ops.fifo.get_sema_incr_cmd_size();
|
||||
err = gk20a_channel_alloc_priv_cmdbuf(c, incr_cmd_size, incr_cmd);
|
||||
if (err) {
|
||||
if (err != 0) {
|
||||
nvgpu_err(c->g,
|
||||
"not enough priv cmd buffer space");
|
||||
goto clean_up_sema;
|
||||
@@ -552,7 +552,7 @@ static int channel_sync_semaphore_incr_common(
|
||||
err = nvgpu_os_fence_sema_create(&os_fence, c,
|
||||
semaphore);
|
||||
|
||||
if (err) {
|
||||
if (err != 0) {
|
||||
goto clean_up_sema;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user