Skip to contentSkip to conversation

crypto: dh - Consistenly return negative error codes

PATCH In review Mat Martineau 2 participants 2 messages Nov 8, 2016 – Nov 13, 2016 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: dh - Consistenly return negative error codes

Fix the single instance where a positive EINVAL was returned.

---
 crypto/dh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/dh.c +1 -1
index 9d19360..ddcb528 100644
@@ -118,7 +118,7 @@ static int dh_compute_value(struct kpp_request *req)
 	if (req->src) {
 		base = mpi_read_raw_from_sgl(req->src, req->src_len);
 		if (!base) {
-			ret = EINVAL;
+			ret = -EINVAL;
 			goto err_free_val;
 		}
 	} else {
Signature · 1 line
2.10.2
maintainer
#1 lore raw
Quoted 3 lines · Mat Martineau

Fix the single instance where a positive EINVAL was returned.

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt