summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2015-02-07 06:27:45 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2015-02-28 23:31:36 +1300
commit6cf02fcab1f6158c224fb00619f21556d8e5c4ea (patch)
tree70675964df0df5dddc5f2bc6d364217809d7252d /drivers/crypto
parent58ed798b8291f1d63c00d6dfe077587494a6790a (diff)
downloadblackbird-op-linux-6cf02fcab1f6158c224fb00619f21556d8e5c4ea.tar.gz
blackbird-op-linux-6cf02fcab1f6158c224fb00619f21556d8e5c4ea.zip
crypto: sahara - pass on error condition
A failure of sahara_hw_descriptor_create() with -EINVAL due to scatter list out of bounds/invalid would not be reported back. This patch just passes on the -EINVAL so it is visible in sahara_queue_manage(). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/sahara.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index b65e2a5ab46f..822978d823aa 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -602,6 +602,8 @@ static int sahara_aes_process(struct ablkcipher_request *req)
reinit_completion(&dev->dma_completion);
ret = sahara_hw_descriptor_create(dev);
+ if (ret)
+ return -EINVAL;
timeout = wait_for_completion_timeout(&dev->dma_completion,
msecs_to_jiffies(SAHARA_TIMEOUT_MS));
OpenPOWER on IntegriCloud