From: Pablo Neira Ayuso Date: Wed, 14 Mar 2007 23:41:28 +0000 (-0700) Subject: [NETFILTER]: nfnetlink: remove unrequired check in nfnetlink_get_subsys X-Git-Tag: v2.6.22-rc1~1128^2~295 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac0f1d9894650d900af99bdaed83e110d9dce025;p=linux-2.6 [NETFILTER]: nfnetlink: remove unrequired check in nfnetlink_get_subsys subsys_table is initialized to NULL, therefore just returns NULL in case that it is not set. Signed-off-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c index 9d33807ec1..0b0a9666f6 100644 --- a/net/netfilter/nfnetlink.c +++ b/net/netfilter/nfnetlink.c @@ -94,8 +94,7 @@ static inline struct nfnetlink_subsystem *nfnetlink_get_subsys(u_int16_t type) { u_int8_t subsys_id = NFNL_SUBSYS_ID(type); - if (subsys_id >= NFNL_SUBSYS_COUNT - || subsys_table[subsys_id] == NULL) + if (subsys_id >= NFNL_SUBSYS_COUNT) return NULL; return subsys_table[subsys_id];