summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorJeremy Linton <jeremy.linton@arm.com>2015-08-19 18:46:43 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-20 23:36:25 +0200
commit4d14a63400dd3e353acb6547831fe465f85864b1 (patch)
tree771aef9a691368b5f88671302f609a550d73e29e /drivers/net/ethernet
parentdevice property: Add ETH_ALEN check, update comments. (diff)
downloadlinux-4d14a63400dd3e353acb6547831fe465f85864b1.tar.xz
linux-4d14a63400dd3e353acb6547831fe465f85864b1.zip
smsc911x: Remove dev==NULL check.
The dev==NULL check in smsc911x_probe_config is useless and isn't providing any additional protection. If a fwnode doesn't exist then an appropriate error should be returned by device_get_phy_mode() covering the original case of a missing of/fwnode. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/smsc/smsc911x.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
index 34f97684506b..6eef3251d833 100644
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
@@ -2370,9 +2370,6 @@ static int smsc911x_probe_config(struct smsc911x_platform_config *config,
int phy_interface;
u32 width = 0;
- if (!dev)
- return -ENODEV;
-
phy_interface = device_get_phy_mode(dev);
if (phy_interface < 0)
return phy_interface;