mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
[NETFILTER]: nfnetlink_log: micro-optimization for inst==NULL in nfulnl_recv_config()
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>
This commit is contained in:
parent
55b5a91e17
commit
f414c16c04
1 changed files with 3 additions and 3 deletions
|
@ -810,13 +810,13 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
|
||||||
NETLINK_CB(skb).pid);
|
NETLINK_CB(skb).pid);
|
||||||
if (!inst) {
|
if (!inst) {
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto out_put;
|
goto out;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NFULNL_CFG_CMD_UNBIND:
|
case NFULNL_CFG_CMD_UNBIND:
|
||||||
if (!inst) {
|
if (!inst) {
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto out_put;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inst->peer_pid != NETLINK_CB(skb).pid) {
|
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=%u pid=%u =>ENOENT\n",
|
||||||
group_num, NETLINK_CB(skb).pid);
|
group_num, NETLINK_CB(skb).pid);
|
||||||
ret = -ENOENT;
|
ret = -ENOENT;
|
||||||
goto out_put;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inst->peer_pid != NETLINK_CB(skb).pid) {
|
if (inst->peer_pid != NETLINK_CB(skb).pid) {
|
||||||
|
|
Loading…
Reference in a new issue