net: macb: fix missing unlock on error in macb_start_xmit()
authorWei Yongjun <weiyongjun1@huawei.com>
Sat, 10 Sep 2016 11:17:57 +0000 (11:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Sep 2016 15:42:27 +0000 (11:42 -0400)
Fix missing unlock before return from function macb_start_xmit()
in the error handling case.

Fixes: 007e4ba3ee13 ("net: macb: initialize checksum when using
checksum offloading")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb.c

index 0294b6a872659e62c9578a364735312115449e64..63144bb413d1696e48c103ee6045d4bc224b952a 100644 (file)
@@ -1398,7 +1398,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        if (macb_clear_csum(skb)) {
                dev_kfree_skb_any(skb);
-               return NETDEV_TX_OK;
+               goto unlock;
        }
 
        /* Map socket buffer for DMA transfer */