[PATCH] kms: Return a negative error code in kms_bo_create()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
---
 libkms/api.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libkms/api.c b/libkms/api.c
index 4a05f3d..5befaa0 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;
 		}
 	}
 
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux