lance: remove unnecessary setting of skb->dev
authorJon Mason <jdmason@kudzu.us>
Mon, 9 Jul 2012 14:09:25 +0000 (14:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jul 2012 06:24:56 +0000 (23:24 -0700)
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>
drivers/net/ethernet/amd/lance.c

index a6e2e840884ecc1bf04084ddb02012b046b8cc4d..5c728436b85e7df0cf9421fa6185e45c2b52bd3c 100644 (file)
@@ -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;