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>
main
Jonathan Gray 2015-09-01 21:37:19 +10:00 committed by Alex Deucher
parent f17017b8e2
commit 949c325c50
1 changed files with 1 additions and 1 deletions

View File

@ -482,7 +482,7 @@ int amdgpu_bo_cpu_unmap(amdgpu_bo_handle bo)
if (bo->cpu_map_count == 0) { if (bo->cpu_map_count == 0) {
/* not mapped */ /* not mapped */
pthread_mutex_unlock(&bo->cpu_access_mutex); pthread_mutex_unlock(&bo->cpu_access_mutex);
return -EBADMSG; return -EINVAL;
} }
bo->cpu_map_count--; bo->cpu_map_count--;