From: Wei Yongjun Date: Sat, 10 Sep 2016 11:17:57 +0000 (+0000) Subject: net: macb: fix missing unlock on error in macb_start_xmit() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a7c22bda52e24094c7bc96afcd897ddad2b28bc0;p=openwrt%2Fstaging%2Fblogic.git net: macb: fix missing unlock on error in macb_start_xmit() 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 Acked-by: Nicolas Ferre Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 0294b6a87265..63144bb413d1 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -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 */