Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c762be63 authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: algif_skcipher - Pass on error from af_alg_make_sg



The error returned from af_alg_make_sg is currently lost and we
always pass on -EINVAL.  This patch pases on the underlying error.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 887c883e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -472,7 +472,8 @@ static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock,
				goto unlock;

			used = af_alg_make_sg(&ctx->rsgl, from, used, 1);
			if (used < 0)
			err = used;
			if (err < 0)
				goto unlock;

			ablkcipher_request_set_crypt(&ctx->req, sg,