Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+2 -1
+2 -1
crypto/algif_skcipher.c
··· 472 472 goto unlock; 473 473 474 474 used = af_alg_make_sg(&ctx->rsgl, from, used, 1); 475 - if (used < 0) 475 + err = used; 476 + if (err < 0) 476 477 goto unlock; 477 478 478 479 ablkcipher_request_set_crypt(&ctx->req, sg,