Skip to contentSkip to conversation

tcp: correctly crypto_alloc_hash return check

PATCH Applied Insu Yun 2 participants 2 messages Feb 16, 2016 – Feb 18, 2016

Subsystems (3)
lore
Share & tools
lore

Insu Yun

author
#0 lore raw

PATCH 1/1 tcp: correctly crypto_alloc_hash return check

crypto_alloc_hash never returns NULL

---
 net/ipv4/tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp.c +1 -1
index fd17eec..a95aac1 100644
@@ -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;
 		}
Signature · 1 line
1.9.1