diff mbox

[net-next,v2,7/9] net: ipmr: drop ip_mr_init() mrt_cachep null check as we'll panic if it fails

Message ID 1448117852-4254-8-git-send-email-razor@blackwall.org
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Nikolay Aleksandrov Nov. 21, 2015, 2:57 p.m. UTC
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

It's not necessary to check for null as SLAB_PANIC is used and we'll
panic if the alloc fails, so just drop it.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
v2: new patch, keep SLAB_PANIC and drop the unnecessary null check

 net/ipv4/ipmr.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox

Patch

diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index a006d96d6cd9..50aec313119d 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -2677,8 +2677,6 @@  int __init ip_mr_init(void)
 				       sizeof(struct mfc_cache),
 				       0, SLAB_HWCACHE_ALIGN | SLAB_PANIC,
 				       NULL);
-	if (!mrt_cachep)
-		return -ENOMEM;
 
 	err = register_pernet_subsys(&ipmr_net_ops);
 	if (err)