mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: fix fence_from_* retvals
The functions gk20a_fence_from_semaphore and gk20a_fence_from_syncpt return errno-like codes, so replace two conditions with better-fitting errors than -1. Change-Id: Ic9a43cd0365c1eb187e7dc19da14acdd2fbc3f1c Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1605563 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
c6b9177cff
commit
4f8ba3ad0e
@@ -244,7 +244,7 @@ int gk20a_fence_from_semaphore(
|
||||
"f-gk20a-0x%04x",
|
||||
nvgpu_semaphore_gpu_ro_va(semaphore));
|
||||
if (!sync_fence)
|
||||
return -1;
|
||||
return -ENOMEM;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -319,7 +319,7 @@ int gk20a_fence_from_syncpt(
|
||||
sync_fence = nvgpu_nvhost_sync_create_fence(nvhost_dev,
|
||||
id, value, "fence");
|
||||
if (IS_ERR(sync_fence))
|
||||
return -1;
|
||||
return PTR_ERR(sync_fence);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user