diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2010-11-28 16:28:01 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2010-11-28 16:28:01 +0800 |
commit | 9023050ce1947802b418fbd24beb2c8f0ab7bc37 (patch) | |
tree | 7e3f0456deff5693ac036289772f4ec32d336668 | |
parent | 7eac1afeb37aef91d59fabb662e09cb14ca9dd15 (diff) | |
download | linux-crypto-9023050ce1947802b418fbd24beb2c8f0ab7bc37.tar.gz linux-crypto-9023050ce1947802b418fbd24beb2c8f0ab7bc37.zip |
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>
-rw-r--r-- | crypto/algif_skcipher.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index 211c9569..9b2f440e 100644 --- a/crypto/algif_skcipher.c +++ b/crypto/algif_skcipher.c @@ -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, |