Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b1cf0db authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[NETFILTER]: nf_queue: minor cleanup



Clean up

if (x) y;

constructs. We've got nothing to hide :)

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1999414a
Loading
Loading
Loading
Loading
+20 −11
Original line number Original line Diff line number Diff line
@@ -138,15 +138,18 @@ static int __nf_queue(struct sk_buff *skb,
	}
	}


	/* Bump dev refs so they don't vanish while packet is out */
	/* Bump dev refs so they don't vanish while packet is out */
	if (indev) dev_hold(indev);
	if (indev)
	if (outdev) dev_hold(outdev);
		dev_hold(indev);

	if (outdev)
		dev_hold(outdev);
#ifdef CONFIG_BRIDGE_NETFILTER
#ifdef CONFIG_BRIDGE_NETFILTER
	if (skb->nf_bridge) {
	if (skb->nf_bridge) {
		physindev = skb->nf_bridge->physindev;
		physindev = skb->nf_bridge->physindev;
		if (physindev) dev_hold(physindev);
		if (physindev)
			dev_hold(physindev);
		physoutdev = skb->nf_bridge->physoutdev;
		physoutdev = skb->nf_bridge->physoutdev;
		if (physoutdev) dev_hold(physoutdev);
		if (physoutdev)
			dev_hold(physoutdev);
	}
	}
#endif
#endif
	afinfo->saveroute(skb, info);
	afinfo->saveroute(skb, info);
@@ -156,11 +159,15 @@ static int __nf_queue(struct sk_buff *skb,


	if (status < 0) {
	if (status < 0) {
		/* James M doesn't say fuck enough. */
		/* James M doesn't say fuck enough. */
		if (indev) dev_put(indev);
		if (indev)
		if (outdev) dev_put(outdev);
			dev_put(indev);
		if (outdev)
			dev_put(outdev);
#ifdef CONFIG_BRIDGE_NETFILTER
#ifdef CONFIG_BRIDGE_NETFILTER
		if (physindev) dev_put(physindev);
		if (physindev)
		if (physoutdev) dev_put(physoutdev);
			dev_put(physindev);
		if (physoutdev)
			dev_put(physoutdev);
#endif
#endif
		module_put(info->elem->owner);
		module_put(info->elem->owner);
		kfree(info);
		kfree(info);
@@ -222,8 +229,10 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
	rcu_read_lock();
	rcu_read_lock();


	/* Release those devices we held, or Alexey will kill me. */
	/* Release those devices we held, or Alexey will kill me. */
	if (info->indev) dev_put(info->indev);
	if (info->indev)
	if (info->outdev) dev_put(info->outdev);
		dev_put(info->indev);
	if (info->outdev)
		dev_put(info->outdev);
#ifdef CONFIG_BRIDGE_NETFILTER
#ifdef CONFIG_BRIDGE_NETFILTER
	if (skb->nf_bridge) {
	if (skb->nf_bridge) {
		if (skb->nf_bridge->physindev)
		if (skb->nf_bridge->physindev)