summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2017-11-27 04:25:47 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-27 16:44:22 -0500
commit4f8ba3ad0e2bdca3695bf1028cedd58eb87d6d51 (patch)
tree0e37a29b4426f109d7905017fe3f9a489b9c6da7 /drivers/gpu/nvgpu/gk20a/fence_gk20a.c
parentc6b9177cfff8a41c3c3c78f5c47c7df677ced58c (diff)
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>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fence_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fence_gk20a.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
index 60858424..027ff462 100644
--- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
@@ -244,7 +244,7 @@ int gk20a_fence_from_semaphore(
244 "f-gk20a-0x%04x", 244 "f-gk20a-0x%04x",
245 nvgpu_semaphore_gpu_ro_va(semaphore)); 245 nvgpu_semaphore_gpu_ro_va(semaphore));
246 if (!sync_fence) 246 if (!sync_fence)
247 return -1; 247 return -ENOMEM;
248 } 248 }
249#endif 249#endif
250 250
@@ -319,7 +319,7 @@ int gk20a_fence_from_syncpt(
319 sync_fence = nvgpu_nvhost_sync_create_fence(nvhost_dev, 319 sync_fence = nvgpu_nvhost_sync_create_fence(nvhost_dev,
320 id, value, "fence"); 320 id, value, "fence");
321 if (IS_ERR(sync_fence)) 321 if (IS_ERR(sync_fence))
322 return -1; 322 return PTR_ERR(sync_fence);
323 } 323 }
324#endif 324#endif
325 325