Commit a3478bae authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by David S. Miller

of_mdio: mdio_device_create() never returns NULL

mdio_device_create() never returns NULL, thus checking for it in
of_mdiobus_register_device() is pointless...
Suggested-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1f3a1c54
...@@ -98,7 +98,7 @@ static int of_mdiobus_register_device(struct mii_bus *mdio, ...@@ -98,7 +98,7 @@ static int of_mdiobus_register_device(struct mii_bus *mdio,
int rc; int rc;
mdiodev = mdio_device_create(mdio, addr); mdiodev = mdio_device_create(mdio, addr);
if (!mdiodev || IS_ERR(mdiodev)) if (IS_ERR(mdiodev))
return 1; return 1;
/* Associate the OF node with the device structure so it /* Associate the OF node with the device structure so it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment