1
0
Fork 0

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: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
hifive-unleashed-5.1
Petri Gynther 2015-03-30 00:29:13 -07:00 committed by David S. Miller
parent 9abab96d9f
commit fac25940c5
1 changed files with 1 additions and 1 deletions

View File

@ -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 */