All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
To: Sascha Hauer <s.hauer@pengutronix.de>, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Guenter Roeck <linux@roeck-us.net>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	narmstrong@baylibre.com
Subject: Re: [PATCH 2/2] net: dsa: remove phy_disconnect from error path
Date: Thu, 11 Feb 2016 10:39:03 -0500	[thread overview]
Message-ID: <8737szi7e0.fsf@ketchup.mtl.sfl> (raw)
In-Reply-To: <1455187489-30771-2-git-send-email-s.hauer@pengutronix.de>

Hi Sascha,

Sascha Hauer <s.hauer@pengutronix.de> writes:

> The phy has not been initialized, disconnecting it in the error
> path results in a NULL pointer exception. Drop the phy_disconnect
> from the error path.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  net/dsa/slave.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/net/dsa/slave.c b/net/dsa/slave.c
> index 40b9ca7..91e3b2f 100644
> --- a/net/dsa/slave.c
> +++ b/net/dsa/slave.c
> @@ -1194,7 +1194,6 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent,
>  	if (ret) {
>  		netdev_err(master, "error %d registering interface %s\n",
>  			   ret, slave_dev->name);
> -		phy_disconnect(p->phy);
>  		ds->ports[port] = NULL;
>  		free_netdev(slave_dev);
>  		return ret;

I'm adding Neil in the loop, since he did some work similar to this, if
I'm not mistaken.

Thanks,
-v

  reply	other threads:[~2016-02-11 15:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 10:44 [PATCH 1/2] net: dsa: mv88e6xxx: Add support for Marvell 88E6240 Sascha Hauer
2016-02-11 10:44 ` [PATCH 2/2] net: dsa: remove phy_disconnect from error path Sascha Hauer
2016-02-11 15:39   ` Vivien Didelot [this message]
2016-02-15  8:52     ` Neil Armstrong
2016-02-11 15:48   ` Andrew Lunn
2016-02-16 21:05   ` David Miller
2016-02-11 15:45 ` [PATCH 1/2] net: dsa: mv88e6xxx: Add support for Marvell 88E6240 Andrew Lunn
2016-02-16 21:05 ` 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=8737szi7e0.fsf@ketchup.mtl.sfl \
    --to=vivien.didelot@savoirfairelinux.com \
    --cc=andrew@lunn.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=narmstrong@baylibre.com \
    --cc=netdev@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.