Browse Source

crypto: dh - Consistenly return negative error codes

Fix the single instance where a positive EINVAL was returned.

Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Mat Martineau 8 years ago
parent
commit
8edda7d22a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      crypto/dh.c

+ 1 - 1
crypto/dh.c

@@ -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 {