]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tcp: correctly crypto_alloc_hash return check
authorInsu Yun <wuninsu@gmail.com>
Tue, 16 Feb 2016 02:30:33 +0000 (21:30 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Feb 2016 03:23:04 +0000 (22:23 -0500)
crypto_alloc_hash never returns NULL

Signed-off-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c

index 0c36ef4a3f8619792a33a67cf557849baba251ba..483ffdf5aa4dd4ad41809ef73ca2ec815df131c7 100644 (file)
@@ -2950,7 +2950,7 @@ static void __tcp_alloc_md5sig_pool(void)
                        struct crypto_hash *hash;
 
                        hash = crypto_alloc_hash("md5", 0, CRYPTO_ALG_ASYNC);
-                       if (IS_ERR_OR_NULL(hash))
+                       if (IS_ERR(hash))
                                return;
                        per_cpu(tcp_md5sig_pool, cpu).md5_desc.tfm = hash;
                }