Skip to content

Commit

Permalink
lance: remove unnecessary setting of skb->dev
Browse files Browse the repository at this point in the history
skb->dev is being unnecessarily set during ring init.  It is already being set
to the proper value when eth_type_trans is called on packet receive, and the
skb->dev is not referenced anywhere else in the code.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jon Mason authored and David S. Miller committed Jul 11, 2012
1 parent c0589fa commit 5c8b73c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/ethernet/amd/lance.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,10 +873,9 @@ lance_init_ring(struct net_device *dev, gfp_t gfp)

skb = alloc_skb(PKT_BUF_SZ, GFP_DMA | gfp);
lp->rx_skbuff[i] = skb;
if (skb) {
skb->dev = dev;
if (skb)
rx_buff = skb->data;
} else
else
rx_buff = kmalloc(PKT_BUF_SZ, GFP_DMA | gfp);
if (rx_buff == NULL)
lp->rx_ring[i].base = 0;
Expand Down

0 comments on commit 5c8b73c

Please sign in to comment.