atl1c: remove open-coded skb_cow_head.
authorfrançois romieu <romieu@fr.zoreil.com>
Sat, 29 Mar 2014 11:26:15 +0000 (12:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Mar 2014 21:49:47 +0000 (17:49 -0400)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jay Cliburn <jcliburn@gmail.com>
Cc: Chris Snook <chris.snook@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/atheros/atl1c/atl1c_main.c

index 31f262302128c12a0b09a10b1f74958293fee478..e11bf18fbbd19880cb5ea1557dbc0d78cbeccfd4 100644 (file)
@@ -1973,17 +1973,17 @@ static int atl1c_tso_csum(struct atl1c_adapter *adapter,
                          enum atl1c_trans_queue type)
 {
        struct pci_dev *pdev = adapter->pdev;
+       unsigned short offload_type;
        u8 hdr_len;
        u32 real_len;
-       unsigned short offload_type;
-       int err;
 
        if (skb_is_gso(skb)) {
-               if (skb_header_cloned(skb)) {
-                       err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
-                       if (unlikely(err))
-                               return -1;
-               }
+               int err;
+
+               err = skb_cow_head(skb, 0);
+               if (err < 0)
+                       return err;
+
                offload_type = skb_shinfo(skb)->gso_type;
 
                if (offload_type & SKB_GSO_TCPV4) {