From 4f8ba3ad0e2bdca3695bf1028cedd58eb87d6d51 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Mon, 27 Nov 2017 11:25:47 +0200 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1605563 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fence_gk20a.c') 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( "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 -- cgit v1.2.2