Skip to content

Commit

Permalink
smsc911x: Remove dev==NULL check.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Linton authored and David S. Miller committed Aug 20, 2015
1 parent 2f710a3 commit 4d14a63
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/ethernet/smsc/smsc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4d14a63

Please sign in to comment.