mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
crypto: ccree - fix retry handling in cc_send_sync_request()
If cc_queues_status() indicates that the queue is full, cc_send_sync_request() should loop and retry. However, cc_queues_status() returns either 0 (for success), or -ENOSPC (for queue full), while cc_send_sync_request() checks for real errors by comparing with -EAGAIN. Hence -ENOSPC is always considered a real error, and the code never retries the operation. Fix this by just removing the check, as cc_queues_status() never returns any other error value than -ENOSPC. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
f5f7e1a049
commit
b83fd3e5ec
1 changed files with 0 additions and 4 deletions
|
@ -476,10 +476,6 @@ int cc_send_sync_request(struct cc_drvdata *drvdata,
|
|||
break;
|
||||
|
||||
spin_unlock_bh(&mgr->hw_lock);
|
||||
if (rc != -EAGAIN) {
|
||||
cc_pm_put_suspend(dev);
|
||||
return rc;
|
||||
}
|
||||
wait_for_completion_interruptible(&drvdata->hw_queue_avail);
|
||||
reinit_completion(&drvdata->hw_queue_avail);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue