mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
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: Fabio Estevam <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
committed by
David S. Miller
parent
24251c2647
commit
95b80bf3db
@@ -399,8 +399,7 @@ error:
|
||||
}
|
||||
|
||||
/* 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);
|
||||
return err;
|
||||
@@ -425,8 +424,7 @@ void mdiobus_unregister(struct mii_bus *bus)
|
||||
}
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user