* [PATCH -next] crypto: chelsio - Fix passing zero to 'PTR_ERR' warning in chcr_aead_op
@ 2019-01-23 6:55 YueHaibing
2019-02-01 6:49 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-01-23 6:55 UTC (permalink / raw)
To: harsh, herbert, davem; +Cc: linux-kernel, linux-crypto, YueHaibing
Fix a static code checker warning:
drivers/crypto/chelsio/chcr_algo.c:3681
chcr_aead_op() warn: passing zero to 'PTR_ERR'
Fixes: 2debd3325e55 ("crypto: chcr - Add AEAD algos.")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/crypto/chelsio/chcr_algo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c
index adc1b30..18b8a71 100644
--- a/drivers/crypto/chelsio/chcr_algo.c
+++ b/drivers/crypto/chelsio/chcr_algo.c
@@ -3676,9 +3676,9 @@ static int chcr_aead_op(struct aead_request *req,
/* Form a WR from req */
skb = create_wr_fn(req, u_ctx->lldi.rxq_ids[a_ctx(tfm)->rx_qidx], size);
- if (IS_ERR(skb) || !skb) {
+ if (IS_ERR_OR_NULL(skb)) {
chcr_dec_wrcount(cdev);
- return PTR_ERR(skb);
+ return PTR_ERR_OR_ZERO(skb);
}
skb->dev = u_ctx->lldi.ports[0];
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] crypto: chelsio - Fix passing zero to 'PTR_ERR' warning in chcr_aead_op
2019-01-23 6:55 [PATCH -next] crypto: chelsio - Fix passing zero to 'PTR_ERR' warning in chcr_aead_op YueHaibing
@ 2019-02-01 6:49 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2019-02-01 6:49 UTC (permalink / raw)
To: YueHaibing; +Cc: harsh, davem, linux-kernel, linux-crypto
On Wed, Jan 23, 2019 at 02:55:17PM +0800, YueHaibing wrote:
> Fix a static code checker warning:
> drivers/crypto/chelsio/chcr_algo.c:3681
> chcr_aead_op() warn: passing zero to 'PTR_ERR'
>
> Fixes: 2debd3325e55 ("crypto: chcr - Add AEAD algos.")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/crypto/chelsio/chcr_algo.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Patch applied. Thanks.
--
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] 2+ messages in thread
end of thread, other threads:[~2019-02-01 6:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23 6:55 [PATCH -next] crypto: chelsio - Fix passing zero to 'PTR_ERR' warning in chcr_aead_op YueHaibing
2019-02-01 6:49 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).