Commit 95b80bf3 authored by Fabio Estevam's avatar Fabio Estevam Committed by David S. Miller

mdio_bus: Remove unneeded gpiod NULL check

The gpiod API checks for NULL descriptors, so there is no need to
duplicate the check in the driver.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 24251c26
...@@ -399,7 +399,6 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner) ...@@ -399,7 +399,6 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner)
} }
/* Put PHYs in RESET to save power */ /* Put PHYs in RESET to save power */
if (bus->reset_gpiod)
gpiod_set_value_cansleep(bus->reset_gpiod, 1); gpiod_set_value_cansleep(bus->reset_gpiod, 1);
device_del(&bus->dev); device_del(&bus->dev);
...@@ -425,7 +424,6 @@ void mdiobus_unregister(struct mii_bus *bus) ...@@ -425,7 +424,6 @@ void mdiobus_unregister(struct mii_bus *bus)
} }
/* Put PHYs in RESET to save power */ /* Put PHYs in RESET to save power */
if (bus->reset_gpiod)
gpiod_set_value_cansleep(bus->reset_gpiod, 1); gpiod_set_value_cansleep(bus->reset_gpiod, 1);
device_del(&bus->dev); device_del(&bus->dev);
......
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