Skip to content

Commit

Permalink
of_mdio: mdio_device_create() never returns NULL
Browse files Browse the repository at this point in the history
mdio_device_create() never returns NULL, thus checking for it in
of_mdiobus_register_device() is pointless...

Suggested-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sergei Shtylyov authored and David S. Miller committed Mar 14, 2016
1 parent 1f3a1c5 commit a3478ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/of/of_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static int of_mdiobus_register_device(struct mii_bus *mdio,
int rc;

mdiodev = mdio_device_create(mdio, addr);
if (!mdiodev || IS_ERR(mdiodev))
if (IS_ERR(mdiodev))
return 1;

/* Associate the OF node with the device structure so it
Expand Down

0 comments on commit a3478ba

Please sign in to comment.