From: françois romieu Date: Sat, 29 Mar 2014 11:26:16 +0000 (+0100) Subject: atl1e: remove open-coded skb_cow_head. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d8e4435e1644308b8f024630bdf5ecd111bafe20;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git atl1e: remove open-coded skb_cow_head. Signed-off-by: Francois Romieu Cc: Chris Snook Cc: Jay Cliburn Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c index 422aab27ea1b..4345332533ad 100644 --- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c +++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c @@ -1641,17 +1641,17 @@ static u16 atl1e_cal_tdp_req(const struct sk_buff *skb) static int atl1e_tso_csum(struct atl1e_adapter *adapter, struct sk_buff *skb, struct atl1e_tpd_desc *tpd) { + 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) {