[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1455187489-30771-2-git-send-email-s.hauer@pengutronix.de>
Date: Thu, 11 Feb 2016 11:44:49 +0100
From: Sascha Hauer <s.hauer@...gutronix.de>
To: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Guenter Roeck <linux@...ck-us.net>,
Sascha Hauer <s.hauer@...gutronix.de>
Subject: [PATCH 2/2] 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@...gutronix.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;
--
2.7.0.rc3
Powered by blists - more mailing lists