[NETFILTER]: nfnetlink_log: micro-optimization for inst==NULL in nfulnl_recv_config()
authorMichal Miroslaw <mirq-linux@rere.qmqm.pl>
Fri, 23 Mar 2007 18:11:31 +0000 (11:11 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:27:38 +0000 (22:27 -0700)
Simple micro-optimization: don't call instance_put() on known NULL pointers.

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nfnetlink_log.c

index d14cf514160f87787318a3d54151de7f55ddbe53..d4b45e28ebde12a5085fc232ab5e0b3130ea979a 100644 (file)
@@ -810,13 +810,13 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
                                               NETLINK_CB(skb).pid);
                        if (!inst) {
                                ret = -EINVAL;
-                               goto out_put;
+                               goto out;
                        }
                        break;
                case NFULNL_CFG_CMD_UNBIND:
                        if (!inst) {
                                ret = -ENODEV;
-                               goto out_put;
+                               goto out;
                        }
 
                        if (inst->peer_pid != NETLINK_CB(skb).pid) {
@@ -849,7 +849,7 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
                                "group=%u pid=%u =>ENOENT\n",
                                group_num, NETLINK_CB(skb).pid);
                        ret = -ENOENT;
-                       goto out_put;
+                       goto out;
                }
 
                if (inst->peer_pid != NETLINK_CB(skb).pid) {