Patchwork tipc: remove pointless conditional before kfree_skb()

login
register
mail settings
Submitter Wei Yongjun
Date Aug. 28, 2012, 1:05 p.m.
Message ID <CAPgLHd9sEThjDHx5OP4n6ZDNYv9xC_=MCq-VZOhp+Sp3jTeOag@mail.gmail.com>
Download mbox | patch
Permalink /patch/180479/
State Rejected
Delegated to: David Miller
Headers show

Comments

Wei Yongjun - Aug. 28, 2012, 1:05 p.m.
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Remove pointless conditional before kfree_skb().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 net/tipc/port.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/tipc/port.c b/net/tipc/port.c
index 07c42fb..9227d2c 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -770,8 +770,7 @@  static void port_dispatcher_sigh(void *dummy)
 				break;
 			}
 		}
-		if (buf)
-			kfree_skb(buf);
+		kfree_skb(buf);
 		buf = next;
 		continue;
 err:
@@ -819,8 +818,7 @@  err:
 				break;
 			}
 		}
-		if (buf)
-			kfree_skb(buf);
+		kfree_skb(buf);
 		buf = next;
 		continue;
 reject: