mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
crypto: remove redundant backlog checks on EBUSY
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
068c2e7035
commit
4e5b0ad582
5 changed files with 13 additions and 37 deletions
|
|
@ -334,9 +334,7 @@ static int ahash_op_unaligned(struct ahash_request *req,
|
|||
return err;
|
||||
|
||||
err = op(req);
|
||||
if (err == -EINPROGRESS ||
|
||||
(err == -EBUSY && (ahash_request_flags(req) &
|
||||
CRYPTO_TFM_REQ_MAY_BACKLOG)))
|
||||
if (err == -EINPROGRESS || err == -EBUSY)
|
||||
return err;
|
||||
|
||||
ahash_restore_req(req, err);
|
||||
|
|
@ -394,9 +392,7 @@ static int ahash_def_finup_finish1(struct ahash_request *req, int err)
|
|||
req->base.complete = ahash_def_finup_done2;
|
||||
|
||||
err = crypto_ahash_reqtfm(req)->final(req);
|
||||
if (err == -EINPROGRESS ||
|
||||
(err == -EBUSY && (ahash_request_flags(req) &
|
||||
CRYPTO_TFM_REQ_MAY_BACKLOG)))
|
||||
if (err == -EINPROGRESS || err == -EBUSY)
|
||||
return err;
|
||||
|
||||
out:
|
||||
|
|
@ -432,9 +428,7 @@ static int ahash_def_finup(struct ahash_request *req)
|
|||
return err;
|
||||
|
||||
err = tfm->update(req);
|
||||
if (err == -EINPROGRESS ||
|
||||
(err == -EBUSY && (ahash_request_flags(req) &
|
||||
CRYPTO_TFM_REQ_MAY_BACKLOG)))
|
||||
if (err == -EINPROGRESS || err == -EBUSY)
|
||||
return err;
|
||||
|
||||
return ahash_def_finup_finish1(req, err);
|
||||
|
|
|
|||
Loading…
Reference in a new issue