linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mason <slash.tmp@free.fr>
To: Johan Hovold <johan@kernel.org>, Mans Rullgard <mans@mansr.com>,
	Sebastian Frias <sf84@laposte.net>
Cc: netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Joe Perches <joe@perches.com>,
	Brian Norris <computersforpeace@gmail.com>
Subject: Re: [PATCH net 04/16] net: ethernet: aurora: nb8800: fix fixed-link phydev leaks
Date: Wed, 30 Nov 2016 10:36:45 +0100	[thread overview]
Message-ID: <583E9DAD.8090205@free.fr> (raw)
In-Reply-To: <1480357509-28074-5-git-send-email-johan@kernel.org>

On 28/11/2016 19:24, Johan Hovold wrote:

> Make sure to deregister and free any fixed-link PHY registered using
> of_phy_register_fixed_link() on probe errors and on driver unbind.
> 
> Fixes: c7dfe3abf40e ("net: ethernet: nb8800: support fixed-link DT node")
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
>  drivers/net/ethernet/aurora/nb8800.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

Did you use scripts/get_maintainer.pl ?

Neither the author of the driver (Mans) nor the author of
the code in question (Sebastian) were CCed on this patch.

It looks like the CC list was truncated, the last entry being

  Vivien Didelot <

Regards.


> diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c
> index 00c38bf151e6..e078d8da978c 100644
> --- a/drivers/net/ethernet/aurora/nb8800.c
> +++ b/drivers/net/ethernet/aurora/nb8800.c
> @@ -1466,12 +1466,12 @@ static int nb8800_probe(struct platform_device *pdev)
>  
>  	ret = nb8800_hw_init(dev);
>  	if (ret)
> -		goto err_free_bus;
> +		goto err_deregister_fixed_link;
>  
>  	if (ops && ops->init) {
>  		ret = ops->init(dev);
>  		if (ret)
> -			goto err_free_bus;
> +			goto err_deregister_fixed_link;
>  	}
>  
>  	dev->netdev_ops = &nb8800_netdev_ops;
> @@ -1504,6 +1504,9 @@ static int nb8800_probe(struct platform_device *pdev)
>  
>  err_free_dma:
>  	nb8800_dma_free(dev);
> +err_deregister_fixed_link:
> +	if (of_phy_is_fixed_link(pdev->dev.of_node))
> +		of_phy_deregister_fixed_link(pdev->dev.of_node);
>  err_free_bus:
>  	of_node_put(priv->phy_node);
>  	mdiobus_unregister(bus);
> @@ -1521,6 +1524,8 @@ static int nb8800_remove(struct platform_device *pdev)
>  	struct nb8800_priv *priv = netdev_priv(ndev);
>  
>  	unregister_netdev(ndev);
> +	if (of_phy_is_fixed_link(pdev->dev.of_node))
> +		of_phy_deregister_fixed_link(pdev->dev.of_node);
>  	of_node_put(priv->phy_node);
>  
>  	mdiobus_unregister(priv->mii_bus);

  reply	other threads:[~2016-11-30  9:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28 18:24 [PATCH net 00/16] net: fix fixed-link phydev leaks Johan Hovold
2016-11-28 18:24 ` [PATCH net 01/16] net: dsa: slave: fix of-node leak and phy priority Johan Hovold
2016-11-28 18:24 ` [PATCH net 02/16] of_mdio: add helper to deregister fixed-link PHYs Johan Hovold
2016-11-28 18:24 ` [PATCH net 03/16] net: ethernet: altera: fix fixed-link phydev leaks Johan Hovold
2016-11-28 18:24 ` [PATCH net 04/16] net: ethernet: aurora: nb8800: " Johan Hovold
2016-11-30  9:36   ` Mason [this message]
2016-11-30  9:51     ` Johan Hovold
2016-11-28 18:24 ` [PATCH net 05/16] net: ethernet: bcmsysport: " Johan Hovold
2016-11-28 18:24 ` [PATCH net 06/16] net: ethernet: bcmgenet: " Johan Hovold
2016-11-28 18:25 ` [PATCH net 07/16] net: ethernet: fec: " Johan Hovold
2016-11-28 18:25 ` [PATCH net 08/16] net: ethernet: fs_enet: " Johan Hovold
2016-11-28 18:25 ` [PATCH net 09/16] net: ethernet: gianfar: " Johan Hovold
2016-11-28 18:25 ` [PATCH net 10/16] net: ethernet: ucc_geth: " Johan Hovold
2016-11-28 18:25 ` [PATCH net 11/16] net: ethernet: marvell: mvneta: " Johan Hovold
2016-11-28 20:10   ` Thomas Petazzoni
2020-05-06 18:57   ` Naresh Kamboju
2020-05-07  6:44     ` Johan Hovold
2020-05-07  6:47       ` Greg Kroah-Hartman
2020-05-07 11:13         ` Greg Kroah-Hartman
2020-05-07 22:05           ` Naresh Kamboju
2020-05-08  6:21             ` Johan Hovold
2020-05-08 12:02               ` Greg Kroah-Hartman
2016-11-28 18:25 ` [PATCH net 12/16] net: ethernet: mediatek: " Johan Hovold
2016-11-28 18:25 ` [PATCH net 13/16] net: ethernet: renesas: ravb: " Johan Hovold
2016-11-28 18:25 ` [PATCH net 14/16] net: ethernet: dwc_eth_qos: " Johan Hovold
2016-11-28 18:25 ` [PATCH net 15/16] net: ethernet: ti: davinci_emac: fix fixed-link phydev and of-node leaks Johan Hovold
2016-11-28 18:25 ` [PATCH net 16/16] net: dsa: slave: fix fixed-link phydev leaks Johan Hovold
2016-11-30  4:17 ` [PATCH net 00/16] net: " David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=583E9DAD.8090205@free.fr \
    --to=slash.tmp@free.fr \
    --cc=computersforpeace@gmail.com \
    --cc=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mans@mansr.com \
    --cc=netdev@vger.kernel.org \
    --cc=sf84@laposte.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).