[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150412225316.GA5195@electric-eye.fr.zoreil.com>
Date: Mon, 13 Apr 2015 00:53:16 +0200
From: Francois Romieu <romieu@...zoreil.com>
To: Felix Fietkau <nbd@...nwrt.org>
Cc: netdev@...r.kernel.org, zajec5@...il.com, hauke@...ke-m.de,
eric.dumazet@...il.com
Subject: Re: [PATCH v3 7/9] bgmac: simplify dma init/cleanup
Felix Fietkau <nbd@...nwrt.org> :
[...]
> diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
> index 3ac8d9a..417415c 100644
> --- a/drivers/net/ethernet/broadcom/bgmac.c
> +++ b/drivers/net/ethernet/broadcom/bgmac.c
[...]
> @@ -1261,8 +1253,15 @@ static int bgmac_open(struct net_device *net_dev)
> int err = 0;
>
> bgmac_chip_reset(bgmac);
> +
> + err = bgmac_dma_init(bgmac);
> + if (err) {
> + bgmac_dma_cleanup(bgmac);
> + return err;
> + }
> +
> /* Specs say about reclaiming rings here, but we do that in DMA init */
> - bgmac_chip_init(bgmac, true);
> + bgmac_chip_init(bgmac);
>
> err = request_irq(bgmac->core->irq, bgmac_interrupt, IRQF_SHARED,
> KBUILD_MODNAME, net_dev);
> @@ -1293,6 +1292,7 @@ static int bgmac_stop(struct net_device *net_dev)
> free_irq(bgmac->core->irq, net_dev);
>
> bgmac_chip_reset(bgmac);
> + bgmac_dma_cleanup(bgmac);
>
> return 0;
> }
Looks like missing bgmac_dma_cleanup if request_irq fails.
--
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists