public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] wan: remove some pointless conditionals before kfree_skb()
@ 2009-02-25 10:22 Wei Yongjun
  2009-02-25 15:42 ` Jan Yenya Kasprzak
  2009-02-27  7:08 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2009-02-25 10:22 UTC (permalink / raw)
  To: Jan "Yenya" Kasprzak, Jeff Garzik; +Cc: netdev

Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun <yjwei@cn•fujitsu.com>
---
 drivers/net/wan/cosa.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 0d7ba11..d276d72 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -731,8 +731,7 @@ static char *cosa_net_setup_rx(struct channel_data *chan, int size)
 	 * We can safely fall back to non-dma-able memory, because we have
 	 * the cosa->bouncebuf pre-allocated.
 	 */
-	if (chan->rx_skb)
-		kfree_skb(chan->rx_skb);
+	kfree_skb(chan->rx_skb);
 	chan->rx_skb = dev_alloc_skb(size);
 	if (chan->rx_skb == NULL) {
 		printk(KERN_NOTICE "%s: Memory squeeze, dropping packet\n",
-- 
1.5.3.8





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-27  7:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25 10:22 [PATCH] wan: remove some pointless conditionals before kfree_skb() Wei Yongjun
2009-02-25 15:42 ` Jan Yenya Kasprzak
2009-02-27  7:08 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox