diff options
author | Iuliana Prodan <iuliana.prodan@nxp.com> | 2020-03-13 16:34:32 +0200 |
---|---|---|
committer | Iuliana Prodan <iuliana.prodan@nxp.com> | 2020-03-19 11:06:49 +0200 |
commit | 4031641e56377cc34d34189429e0e29c575e9b12 (patch) | |
tree | 3f2fe14e150af492970f1fa69ee951e866af45fb /security | |
parent | 3a6947d9cc031c60dd95a1dadb88ea6240ffd339 (diff) |
MLK-23620-1 security/keys/secure_key: update the check for the return code of caam_jr_enqueue function
In commit 4d370a103695 ("crypto: caam - change return code in caam_jr_enqueue function"),
the return code of caam_jr_enqueue function was changed
from 0 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 the case for wait_for_completion in sk_job_submit
based on the new return code from caam_jr_enqueue function.
Fixes: 4d370a103695 ("crypto: caam - change return code in caam_jr_enqueue function")
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/keys/securekey_desc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/keys/securekey_desc.c b/security/keys/securekey_desc.c index 03a57cb93a74..2fc0fb9c2a54 100644 --- a/security/keys/securekey_desc.c +++ b/security/keys/securekey_desc.c @@ -393,7 +393,7 @@ static int sk_job_submit(struct device *jrdev, struct sk_req *req) /* caam_jr_enqueue function for Enqueue a job descriptor */ ret = caam_jr_enqueue(jrdev, req->hwdesc, caam_op_done, req); - if (!ret) + if (ret == -EINPROGRESS) wait_for_completion_interruptible(&req->comp); ret = req->ret; |