diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-03-22 21:18:44 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-04-03 09:06:28 +0800 |
commit | eb16796302bad44fd346d4e0e15f8086132d1363 (patch) | |
tree | 1009bf631d1fc036b6114d0ce7cb85d3f36beb10 /drivers/crypto/ux500 | |
parent | 5cec26e9843e4f16974e5a30a3ffada1557b661d (diff) | |
download | op-kernel-dev-eb16796302bad44fd346d4e0e15f8086132d1363.zip op-kernel-dev-eb16796302bad44fd346d4e0e15f8086132d1363.tar.gz |
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.c | 2 |
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 8d16d3a..d99b671 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; } |