From: Wei Yongjun <[email protected]>
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 <[email protected]>
---
drivers/crypto/ux500/hash/hash_core.c | 2 ++
1 file changed, 2 insertions(+)
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;
}
On Fri, Mar 22, 2013 at 2:18 PM, Wei Yongjun <[email protected]> wrote:
> From: Wei Yongjun <[email protected]>
>
> 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 <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Yours,
Linus Walleij
On Mon, Mar 25, 2013 at 04:15:36PM +0100, Linus Walleij wrote:
> On Fri, Mar 22, 2013 at 2:18 PM, Wei Yongjun <[email protected]> wrote:
>
> > From: Wei Yongjun <[email protected]>
> >
> > 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 <[email protected]>
>
> Acked-by: Linus Walleij <[email protected]>
Patch applied.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt