mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: Fix Unused value Defect
Fix following Coverity Defect: nvgpu_init.c : Unused value The ret variable was being reassigned the error code from nvgpu_cic_mon_deinit(g) without taking into account the previous ret value. We need to propagate whether there is an error (the last known error is returned) or not using ret, the temp_ret variable helps in verifying this. Similar coding style followed in the entire function. CID 10127863 Bug 3460991 Signed-off-by: Jinesh Parakh <jparakh@nvidia.com> Change-Id: I732ba5269ebbbe68f113e53229df40ae49ccc13c Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2697104 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
60481ea5e4
commit
167e7b0256
@@ -394,8 +394,9 @@ int nvgpu_prepare_poweroff(struct gk20a *g)
|
||||
* This will ensure that CIC will not get probed
|
||||
* after it's deinit.
|
||||
*/
|
||||
ret = nvgpu_cic_mon_deinit(g);
|
||||
if (ret != 0) {
|
||||
tmp_ret = nvgpu_cic_mon_deinit(g);
|
||||
if (tmp_ret != 0) {
|
||||
ret = tmp_ret;
|
||||
nvgpu_err(g, "Failed to deinit CIC-mon.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user