diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-03-22 09:18:44 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-04-02 21:06:28 -0400 |
commit | eb16796302bad44fd346d4e0e15f8086132d1363 (patch) | |
tree | 1009bf631d1fc036b6114d0ce7cb85d3f36beb10 /drivers/crypto/ux500/hash | |
parent | 5cec26e9843e4f16974e5a30a3ffada1557b661d (diff) |
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/hash')
-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 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) | |||
939 | if (!ctx->device->dma.nents) { | 939 | if (!ctx->device->dma.nents) { |
940 | dev_err(device_data->dev, "[%s] " | 940 | dev_err(device_data->dev, "[%s] " |
941 | "ctx->device->dma.nents = 0", __func__); | 941 | "ctx->device->dma.nents = 0", __func__); |
942 | ret = ctx->device->dma.nents; | ||
942 | goto out; | 943 | goto out; |
943 | } | 944 | } |
944 | 945 | ||
@@ -946,6 +947,7 @@ static int hash_dma_final(struct ahash_request *req) | |||
946 | if (bytes_written != req->nbytes) { | 947 | if (bytes_written != req->nbytes) { |
947 | dev_err(device_data->dev, "[%s] " | 948 | dev_err(device_data->dev, "[%s] " |
948 | "hash_dma_write() failed!", __func__); | 949 | "hash_dma_write() failed!", __func__); |
950 | ret = bytes_written; | ||
949 | goto out; | 951 | goto out; |
950 | } | 952 | } |
951 | 953 | ||