aboutsummaryrefslogtreecommitdiffstats
path: root/amdgpu
diff options
context:
space:
mode:
authorJonathan Gray2015-09-01 06:37:19 -0500
committerAlex Deucher2015-09-02 09:00:25 -0500
commit949c325c50d4036fed1cfb34c304d3bd7b54ad28 (patch)
treedce293bf7ff4cb7707027f82a4e5aa55b590350a /amdgpu
parentf17017b8e29b7fb8bf2c8b195bef5d4b0b4bc044 (diff)
downloadexternal-libdrm-949c325c50d4036fed1cfb34c304d3bd7b54ad28.tar.gz
external-libdrm-949c325c50d4036fed1cfb34c304d3bd7b54ad28.tar.xz
external-libdrm-949c325c50d4036fed1cfb34c304d3bd7b54ad28.zip
amdgpu: use EINVAL instead of EBADMSG in amdgpu_bo_cpu_unmap()
EBADMSG is a streams errno. OpenBSD does not implement streams and does include the streams errnos, this commit fixes the build on OpenBSD. None of the callers of this function check the return value for -EBADMSG. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Diffstat (limited to 'amdgpu')
-rw-r--r--amdgpu/amdgpu_bo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
index 220422d8..348da003 100644
--- a/amdgpu/amdgpu_bo.c
+++ b/amdgpu/amdgpu_bo.c
@@ -482,7 +482,7 @@ int amdgpu_bo_cpu_unmap(amdgpu_bo_handle bo)
482 if (bo->cpu_map_count == 0) { 482 if (bo->cpu_map_count == 0) {
483 /* not mapped */ 483 /* not mapped */
484 pthread_mutex_unlock(&bo->cpu_access_mutex); 484 pthread_mutex_unlock(&bo->cpu_access_mutex);
485 return -EBADMSG; 485 return -EINVAL;
486 } 486 }
487 487
488 bo->cpu_map_count--; 488 bo->cpu_map_count--;