Commit fac25940 authored by Petri Gynther's avatar Petri Gynther Committed by David S. Miller

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.
Signed-off-by: default avatarPetri Gynther <pgynther@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9abab96d
...@@ -2666,7 +2666,7 @@ static int bcmgenet_open(struct net_device *dev) ...@@ -2666,7 +2666,7 @@ static int bcmgenet_open(struct net_device *dev)
ret = bcmgenet_init_dma(priv); ret = bcmgenet_init_dma(priv);
if (ret) { if (ret) {
netdev_err(dev, "failed to initialize DMA\n"); netdev_err(dev, "failed to initialize DMA\n");
goto err_fini_dma; goto err_clk_disable;
} }
/* Always enable ring 16 - descriptor ring */ /* Always enable ring 16 - descriptor ring */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment