Skip to contentSkip to conversation

net: bcmgenet: fix bcmgenet_open()

PATCH In review Petri Gynther 1 participant 1 message Mar 30, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 3/5 net: bcmgenet: fix bcmgenet_open()

If bcmgenet_init_dma() fails, it cleans up after itself. Rx and Tx DMAs are off, and NAPI instances haven't been netif_napi_add()'ed. Therefore, we need to skip calling bcmgenet_fini_dma() on the error handling path. bcmgenet_resume() already does this correctly.

---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +1 -1
index 546d862..5238b33 100644
@@ -2666,7 +2666,7 @@ static int bcmgenet_open(struct net_device *dev)
 	ret = bcmgenet_init_dma(priv);
 	if (ret) {
 		netdev_err(dev, "failed to initialize DMA\n");
-		goto err_fini_dma;
+		goto err_clk_disable;
 	}
 
 	/* Always enable ring 16 - descriptor ring */
Signature · 1 line
2.2.0.rc0.207.ga3a616c