From: Andrew Lunn <andrew@lunn.ch>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH 2/2] net: dsa: remove phy_disconnect from error path
Date: Thu, 11 Feb 2016 16:48:51 +0100 [thread overview]
Message-ID: <20160211154851.GA24249@lunn.ch> (raw)
In-Reply-To: <1455187489-30771-2-git-send-email-s.hauer@pengutronix.de>
On Thu, Feb 11, 2016 at 11:44:49AM +0100, Sascha Hauer wrote:
> 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>
Hi Sascha
The fix looks correct, since the phy should be bound to the device in
the following dsa_slave_phy_setup() call.
I'm not sure if Neil also fixed this...
Anyway,
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
> ---
> 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;
> --
> 2.7.0.rc3
>
next prev parent reply other threads:[~2016-02-11 15:48 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
2016-02-15 8:52 ` Neil Armstrong
2016-02-11 15:48 ` Andrew Lunn [this message]
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=20160211154851.GA24249@lunn.ch \
--to=andrew@lunn.ch \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox