mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +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",
|
"f-gk20a-0x%04x",
|
||||||
nvgpu_semaphore_gpu_ro_va(semaphore));
|
nvgpu_semaphore_gpu_ro_va(semaphore));
|
||||||
if (!sync_fence)
|
if (!sync_fence)
|
||||||
return -1;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -319,7 +319,7 @@ int gk20a_fence_from_syncpt(
|
|||||||
sync_fence = nvgpu_nvhost_sync_create_fence(nvhost_dev,
|
sync_fence = nvgpu_nvhost_sync_create_fence(nvhost_dev,
|
||||||
id, value, "fence");
|
id, value, "fence");
|
||||||
if (IS_ERR(sync_fence))
|
if (IS_ERR(sync_fence))
|
||||||
return -1;
|
return PTR_ERR(sync_fence);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user