net: bcmgenet: fix bcmgenet_open()
authorPetri Gynther <pgynther@google.com>
Mon, 30 Mar 2015 07:29:13 +0000 (00:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Mar 2015 18:15:01 +0000 (14:15 -0400)
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>
drivers/net/ethernet/broadcom/genet/bcmgenet.c

index 546d8623d8eb3948085fa83e71b179484bf727ea..5238b33f7b8d91d080de3968455e3478fce8bb16 100644 (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 */