summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-11-01 10:32:05 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-11-01 10:53:25 +0100
commit07d92fcf8d49576c6211795870f02685f9b7861d (patch)
tree3414d8923a9fb3d600337e3b0404deff16f2088f
parente32fff8e9ea8d522679eaab21a9555cab134fb36 (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.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 **
type = value;
break;
default:
- return EINVAL;
+ return -EINVAL;
}
}