From 949c325c50d4036fed1cfb34c304d3bd7b54ad28 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Tue, 1 Sep 2015 21:37:19 +1000 Subject: [PATCH] amdgpu: use EINVAL instead of EBADMSG in amdgpu_bo_cpu_unmap() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jonathan Gray --- amdgpu/amdgpu_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) if (bo->cpu_map_count == 0) { /* not mapped */ pthread_mutex_unlock(&bo->cpu_access_mutex); - return -EBADMSG; + return -EINVAL; } bo->cpu_map_count--;