From: Yunfeng Ye Date: Fri, 11 Oct 2019 12:44:53 +0000 (+0800) Subject: crypto: chtls - remove the redundant check in chtls_recvmsg() X-Git-Tag: v5.5-rc1~175^2~198 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=fcf801cc551a05a439f819d91b5f853a49c8d243;p=linux.git crypto: chtls - remove the redundant check in chtls_recvmsg() 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 Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/chelsio/chtls/chtls_io.c b/drivers/crypto/chelsio/chtls/chtls_io.c index 2512bfb24d71..e05343206c3a 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 &&