smsc911x: Remove dev==NULL check.
authorJeremy Linton <jeremy.linton@arm.com>
Wed, 19 Aug 2015 16:46:43 +0000 (11:46 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Aug 2015 21:36:25 +0000 (14:36 -0700)
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>
drivers/net/ethernet/smsc/smsc911x.c

index 34f97684506bcfb2c585b182c545ac5a7d99bcd8..6eef3251d8333233445122ff6321091b6292155a 100644 (file)
@@ -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;