* [PATCH -next] crypto: ux500 - fix error return code in hash_dma_final()
@ 2013-03-22 13:18 Wei Yongjun
2013-03-25 15:15 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2013-03-22 13:18 UTC (permalink / raw)
To: herbert, linus.walleij, andreas.westin, arnd, rubini
Cc: yongjun_wei, linux-crypto
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
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>
---
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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] crypto: ux500 - fix error return code in hash_dma_final()
2013-03-22 13:18 [PATCH -next] crypto: ux500 - fix error return code in hash_dma_final() Wei Yongjun
@ 2013-03-25 15:15 ` Linus Walleij
2013-04-03 1:52 ` Herbert Xu
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2013-03-25 15:15 UTC (permalink / raw)
To: Wei Yongjun
Cc: herbert, andreas.westin, arnd, rubini, yongjun_wei, linux-crypto,
Rikard OLSSON, magnus.p.persson
On Fri, Mar 22, 2013 at 2:18 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] crypto: ux500 - fix error return code in hash_dma_final()
2013-03-25 15:15 ` Linus Walleij
@ 2013-04-03 1:52 ` Herbert Xu
0 siblings, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2013-04-03 1:52 UTC (permalink / raw)
To: Linus Walleij
Cc: Wei Yongjun, andreas.westin, arnd, rubini, yongjun_wei,
linux-crypto, Rikard OLSSON, magnus.p.persson
On Mon, Mar 25, 2013 at 04:15:36PM +0100, Linus Walleij wrote:
> On Fri, Mar 22, 2013 at 2:18 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
>
> > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> >
> > 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>
Patch applied.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-03 1:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-22 13:18 [PATCH -next] crypto: ux500 - fix error return code in hash_dma_final() Wei Yongjun
2013-03-25 15:15 ` Linus Walleij
2013-04-03 1:52 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.