mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
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: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
887c883eea
commit
c762be6375
1 changed files with 2 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue