crypto: chtls - remove the redundant check in chtls_recvmsg()
authorYunfeng Ye <yeyunfeng@huawei.com>
Fri, 11 Oct 2019 12:44:53 +0000 (20:44 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 23 Oct 2019 08:46:57 +0000 (19:46 +1100)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/chelsio/chtls/chtls_io.c

index 2512bfb24d712852b584cd12381870ad7a68ec2f..e05343206c3aa86133452aa48f875487ad68ed59 100644 (file)
@@ -1841,8 +1841,7 @@ skip_copy:
                        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 &&