[NETFILTER] NAT: Fix module refcount dropping too far
[linux-2.6.git] / net / ipv4 / netfilter / ip_nat_core.c
index c5e3abd..762f4d9 100644 (file)
@@ -66,10 +66,8 @@ ip_nat_proto_find_get(u_int8_t protonum)
         * removed until we've grabbed the reference */
        preempt_disable();
        p = __ip_nat_proto_find(protonum);
-       if (p) {
-               if (!try_module_get(p->me))
-                       p = &ip_nat_unknown_protocol;
-       }
+       if (!try_module_get(p->me))
+               p = &ip_nat_unknown_protocol;
        preempt_enable();
 
        return p;