All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libdrm] amdgpu: use EINVAL instead of EBADMSG in amdgpu_bo_cpu_unmap()
@ 2015-09-01 11:37 Jonathan Gray
  2015-09-01 13:07 ` Christian König
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Gray @ 2015-09-01 11:37 UTC (permalink / raw)
  To: dri-devel

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.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
---
 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 220422d..348da00 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--;
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-02 20:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-01 11:37 [PATCH libdrm] amdgpu: use EINVAL instead of EBADMSG in amdgpu_bo_cpu_unmap() Jonathan Gray
2015-09-01 13:07 ` Christian König
2015-09-02 20:24   ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.