Skip to content

Commit

Permalink
wan: remove some pointless conditionals before kfree_skb()
Browse files Browse the repository at this point in the history
Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Feb 27, 2009
1 parent c71a269 commit fbbfb98
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wan/cosa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit fbbfb98

Please sign in to comment.