* [PATCH] crypto: chtls - remove the redundant check in chtls_recvmsg()
@ 2019-10-11 12:44 Yunfeng Ye
2019-10-18 8:04 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Yunfeng Ye @ 2019-10-11 12:44 UTC (permalink / raw)
To: atul.gupta, herbert, davem
Cc: willy, kstewart, ira.weiny, akpm, linux-crypto, linux-kernel
A warning message reported by a static analysis tool:
"
Either the condition 'if(skb)' is redundant or there is possible null
pointer dereference: skb.
"
Remove the unused redundant check.
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
---
drivers/crypto/chelsio/chtls/chtls_io.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/chelsio/chtls/chtls_io.c b/drivers/crypto/chelsio/chtls/chtls_io.c
index 0891ab8..0125f4e 100644
--- a/drivers/crypto/chelsio/chtls/chtls_io.c
+++ b/drivers/crypto/chelsio/chtls/chtls_io.c
@@ -1841,8 +1841,7 @@ int chtls_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
tp->urg_data = 0;
if (avail + offset >= skb->len) {
- if (likely(skb))
- chtls_free_skb(sk, skb);
+ chtls_free_skb(sk, skb);
buffers_freed++;
if (copied >= target &&
--
2.7.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: chtls - remove the redundant check in chtls_recvmsg()
2019-10-11 12:44 [PATCH] crypto: chtls - remove the redundant check in chtls_recvmsg() Yunfeng Ye
@ 2019-10-18 8:04 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2019-10-18 8:04 UTC (permalink / raw)
To: Yunfeng Ye
Cc: atul.gupta, davem, willy, kstewart, ira.weiny, akpm,
linux-crypto, linux-kernel
On Fri, Oct 11, 2019 at 08:44:53PM +0800, Yunfeng Ye wrote:
> A warning message reported by a static analysis tool:
> "
> Either the condition 'if(skb)' is redundant or there is possible null
> pointer dereference: skb.
> "
>
> Remove the unused redundant check.
>
> Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
> ---
> drivers/crypto/chelsio/chtls/chtls_io.c | 3 +--
> 1 file changed, 1 insertion(+), 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-10-18 8:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11 12:44 [PATCH] crypto: chtls - remove the redundant check in chtls_recvmsg() Yunfeng Ye
2019-10-18 8:04 ` 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.