Simple micro-optimization: don't call instance_put() on known NULL pointers.
Signed-off-by: Michał Mirosław <[email protected]>
--- linux-2.6.20/net/netfilter/nfnetlink_log.c.3 2007-02-11 20:46:33.000000000 +0100
+++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11 20:46:26.000000000 +0100
@@ -814,13 +814,13 @@ nfulnl_recv_config(struct sock *ctnl, st
NETLINK_CB(skb).pid);
if (!inst) {
ret = -EINVAL;
- goto out_put;
+ goto out_null;
}
break;
case NFULNL_CFG_CMD_UNBIND:
if (!inst) {
ret = -ENODEV;
- goto out_put;
+ goto out_null;
}
if (inst->peer_pid != NETLINK_CB(skb).pid) {
@@ -850,7 +850,7 @@ nfulnl_recv_config(struct sock *ctnl, st
"group=%u pid=%u =>ENOENT\n",
group_num, NETLINK_CB(skb).pid);
ret = -ENOENT;
- goto out_put;
+ goto out_null;
}
if (inst->peer_pid != NETLINK_CB(skb).pid) {
@@ -897,6 +897,7 @@ nfulnl_recv_config(struct sock *ctnl, st
out_put:
instance_put(inst);
+out_null:
return ret;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]