diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-11-01 10:32:05 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-11-01 10:53:25 +0100 |
commit | 07d92fcf8d49576c6211795870f02685f9b7861d (patch) | |
tree | 3414d8923a9fb3d600337e3b0404deff16f2088f | |
parent | e32fff8e9ea8d522679eaab21a9555cab134fb36 (diff) |
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>
-rw-r--r-- | libkms/api.c | 2 |
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 ** type = value; break; default: - return EINVAL; + return -EINVAL; } } |