[PATCH] tcp: correctly crypto_alloc_hash return check

From: Insu Yun
Date: Mon Feb 15 2016 - 21:30:41 EST


crypto_alloc_hash never returns NULL

Signed-off-by: Insu Yun <wuninsu@xxxxxxxxx>
---
net/ipv4/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index fd17eec..a95aac1 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2946,7 +2946,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;
}
--
1.9.1