aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart2012-11-01 04:38:42 -0500
committerJerome Glisse2013-04-18 09:07:01 -0500
commitaa4afdf0b3be20aa6037b64f90983ea0146b2893 (patch)
tree7292bc3e0a8a5ad51d9ed586dd5552a886c32203
parent9fa4a4b1a894fa8fffe2075bc3376b7fa5e18104 (diff)
downloadexternal-libdrm-aa4afdf0b3be20aa6037b64f90983ea0146b2893.tar.gz
external-libdrm-aa4afdf0b3be20aa6037b64f90983ea0146b2893.tar.xz
external-libdrm-aa4afdf0b3be20aa6037b64f90983ea0146b2893.zip
kms: Return a negative error code in kms_bo_create()
The function returns returns 0 on success or a negative value in case of an error, except when given invalid attributes in which case it returns the positive EINVAL value. Replace that with -EINVAL to allow the caller to detect errors with a < 0 check. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>
-rw-r--r--libkms/api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkms/api.c b/libkms/api.c
index 4a05f3d7..5befaa0f 100644
--- a/libkms/api.c
+++ b/libkms/api.c
@@ -80,7 +80,7 @@ int kms_bo_create(struct kms_driver *kms, const unsigned *attr, struct kms_bo **
80 type = value; 80 type = value;
81 break; 81 break;
82 default: 82 default:
83 return EINVAL; 83 return -EINVAL;
84 } 84 }
85 } 85 }
86 86