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>
main
Laurent Pinchart 2012-11-01 09:38:42 +00:00 committed by Jerome Glisse
parent 9fa4a4b1a8
commit aa4afdf0b3
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}