gpu: nvgpu: fix the return sequence

API nvgpu_get_timestamps_zipper() returning with power reference in case
of failure. Patch corrects the sequence.

Bug 3412554

Change-Id: Id5bd027fd9861d2b04341b5045326278cef5c5d1
Signed-off-by: Prateek sethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2551274
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Prateek sethi
2021-06-29 12:38:03 +05:30
committed by mobile promotions
parent 6cf7b9a4b2
commit b4528cac93

View File

@@ -86,19 +86,19 @@ int nvgpu_get_timestamps_zipper(struct gk20a *g,
if (gk20a_busy(g) != 0) {
nvgpu_err(g, "GPU not powered on\n");
err = -EINVAL;
goto end;
return err;
}
for (i = 0; i < count; i++) {
err = g->ops.ptimer.read_ptimer(g, &samples[i].gpu_timestamp);
if (err != 0) {
return err;
goto idle;
}
samples[i].cpu_timestamp = nvgpu_hr_timestamp();
}
end:
idle:
gk20a_idle(g);
return err;
}