Skip to content

Commit 8edda7d

Browse files
mjmartineauherbertx
authored andcommitted
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>
1 parent 109e23b commit 8edda7d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎crypto/dh.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static int dh_compute_value(struct kpp_request *req)
118118
if (req->src) {
119119
base = mpi_read_raw_from_sgl(req->src, req->src_len);
120120
if (!base) {
121-
ret = EINVAL;
121+
ret = -EINVAL;
122122
goto err_free_val;
123123
}
124124
} else {

0 commit comments

Comments
 (0)