summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ux500
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-03-22 14:18:44 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2013-04-03 03:06:28 +0200
commiteb16796302bad44fd346d4e0e15f8086132d1363 (patch)
tree1009bf631d1fc036b6114d0ce7cb85d3f36beb10 /drivers/crypto/ux500
parentcrypto: picoxcell - Use of_match_ptr() macro (diff)
downloadlinux-eb16796302bad44fd346d4e0e15f8086132d1363.tar.xz
linux-eb16796302bad44fd346d4e0e15f8086132d1363.zip
crypto: ux500 - fix error return code in hash_dma_final()
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ux500')
-rw-r--r--drivers/crypto/ux500/hash/hash_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c
index 8d16d3aa7650..d99b671769d9 100644
--- a/drivers/crypto/ux500/hash/hash_core.c
+++ b/drivers/crypto/ux500/hash/hash_core.c
@@ -939,6 +939,7 @@ static int hash_dma_final(struct ahash_request *req)
if (!ctx->device->dma.nents) {
dev_err(device_data->dev, "[%s] "
"ctx->device->dma.nents = 0", __func__);
+ ret = ctx->device->dma.nents;
goto out;
}
@@ -946,6 +947,7 @@ static int hash_dma_final(struct ahash_request *req)
if (bytes_written != req->nbytes) {
dev_err(device_data->dev, "[%s] "
"hash_dma_write() failed!", __func__);
+ ret = bytes_written;
goto out;
}