summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-02-11 11:44:49 +0100
committerDavid S. Miller <davem@davemloft.net>2016-02-16 16:04:08 -0500
commita407054f830ca9a28febdeeeaa34d2ed420b9ed3 (patch)
tree055d5145152317b4325da388de12fc2c1685e171 /net
parentbd16a7248042dc62285fdc5598ec4888c0865819 (diff)
net: dsa: remove phy_disconnect from error path
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> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/dsa/slave.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 40b9ca72aae3..91e3b2ff364a 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;