aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart2014-11-14 23:53:40 -0600
committersrinivas pulukuru2015-01-30 16:04:01 -0600
commit5f74733530adf53accb97485b054f0b76995cbcd (patch)
tree18a876cd47b35f01eb3c28d0925ed427233a2e55
parent5986e020c15065ce5a820237c292846433b05c93 (diff)
downloadlibdrm-5f74733530adf53accb97485b054f0b76995cbcd.tar.gz
libdrm-5f74733530adf53accb97485b054f0b76995cbcd.tar.xz
libdrm-5f74733530adf53accb97485b054f0b76995cbcd.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> Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.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