summaryrefslogtreecommitdiff
path: root/crypto/dh.c
diff options
context:
space:
mode:
authorMat Martineau <mathew.j.martineau@linux.intel.com>2016-11-09 02:48:22 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2016-11-13 12:45:04 +0300
commit8edda7d22a95caddcc66431e4564c7d03568da4d (patch)
treeb9a10d8e5e6a120fff9284ca4a94e815219a58aa /crypto/dh.c
parent109e23bd10b5688895e61916435834c71a0bd1ed (diff)
downloadlinux-8edda7d22a95caddcc66431e4564c7d03568da4d.tar.xz
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>
Diffstat (limited to 'crypto/dh.c')
-rw-r--r--crypto/dh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/dh.c b/crypto/dh.c
index 9d19360e7189..ddcb528ab2cc 100644
--- a/crypto/dh.c
+++ b/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 {