From: Laurent Pinchart Date: Thu, 1 Nov 2012 09:38:42 +0000 (+0000) Subject: kms: Return a negative error code in kms_bo_create() X-Git-Tag: 2.4.44~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa4afdf0b3be20aa6037b64f90983ea0146b2893;p=platform%2Fupstream%2Flibdrm.git 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 Reviewed-by: Jakob Bornecrantz --- 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 ** type = value; break; default: - return EINVAL; + return -EINVAL; } }