diff options
author | Iuliana Prodan <iuliana.prodan@nxp.com> | 2020-02-12 18:55:20 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-02-22 02:25:47 +0100 |
commit | 4d370a1036958d7df9f1492c345b4984a4eba7f6 (patch) | |
tree | 77113940ba078bb828036aec4d3a00f321ac81ab /drivers/crypto/caam/key_gen.c | |
parent | crypto: caam - refactor RSA private key _done callbacks (diff) | |
download | linux-4d370a1036958d7df9f1492c345b4984a4eba7f6.tar.xz linux-4d370a1036958d7df9f1492c345b4984a4eba7f6.zip |
crypto: caam - change return code in caam_jr_enqueue function
Based on commit 6b80ea389a0b ("crypto: change transient busy return code to -ENOSPC"),
change the return code of caam_jr_enqueue function to -EINPROGRESS, in
case of success, -ENOSPC in case the CAAM is busy (has no space left
in job ring queue), -EIO if it cannot map the caller's descriptor.
Update, also, the cases for resource-freeing for each algorithm type.
This is done for later use, on backlogging support in CAAM.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/key_gen.c')
-rw-r--r-- | drivers/crypto/caam/key_gen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/caam/key_gen.c b/drivers/crypto/caam/key_gen.c index 5a851ddc48fb..b0e8a4939b4f 100644 --- a/drivers/crypto/caam/key_gen.c +++ b/drivers/crypto/caam/key_gen.c @@ -108,7 +108,7 @@ int gen_split_key(struct device *jrdev, u8 *key_out, init_completion(&result.completion); ret = caam_jr_enqueue(jrdev, desc, split_key_done, &result); - if (!ret) { + if (ret == -EINPROGRESS) { /* in progress */ wait_for_completion(&result.completion); ret = result.err; |