All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit()
@ 2016-09-10 11:17 Wei Yongjun
  2016-09-12  7:38 ` Nicolas Ferre
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Wei Yongjun @ 2016-09-10 11:17 UTC (permalink / raw)
  To: Nicolas Ferre, Helmut Buchsbaum; +Cc: Wei Yongjun, netdev

From: Wei Yongjun <weiyongjun1@huawei.com>

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>
---
 drivers/net/ethernet/cadence/macb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 0294b6a..63144bb 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 */

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-29 17:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-10 11:17 [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit() Wei Yongjun
2016-09-12  7:38 ` Nicolas Ferre
2016-09-12 17:40 ` Helmut Buchsbaum
2016-09-29 17:21   ` Nicolas Ferre
2016-09-13 15:42 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.