summaryrefslogtreecommitdiffstats
path: root/crypto/algapi.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2017-11-28 08:12:32 -0800
committerTony Lindgren <tony@atomide.com>2017-11-28 08:12:32 -0800
commitbc686442f8a601bccac1f22506ecdb4b0d62cadd (patch)
treeb224ab4aa2350b233da640f5850f48bc6bfeb2d0 /crypto/algapi.c
parent60636a5d0fa2f8bc6d0c23c4027100ba20866f9b (diff)
parentca41e244517d6d3f1600c229ff7ca615049c1e9c (diff)
downloadlinux-bc686442f8a601bccac1f22506ecdb4b0d62cadd.tar.gz
linux-bc686442f8a601bccac1f22506ecdb4b0d62cadd.tar.bz2
linux-bc686442f8a601bccac1f22506ecdb4b0d62cadd.zip
Merge branch 'dts-fixes' into omap-for-v4.15/fixes-dt
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r--crypto/algapi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c
index aa699ff6c876..60d7366ed343 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -897,9 +897,11 @@ int crypto_enqueue_request(struct crypto_queue *queue,
int err = -EINPROGRESS;
if (unlikely(queue->qlen >= queue->max_qlen)) {
- err = -EBUSY;
- if (!(request->flags & CRYPTO_TFM_REQ_MAY_BACKLOG))
+ if (!(request->flags & CRYPTO_TFM_REQ_MAY_BACKLOG)) {
+ err = -ENOSPC;
goto out;
+ }
+ err = -EBUSY;
if (queue->backlog == &queue->list)
queue->backlog = &request->list;
}