|
@@ -399,7 +399,8 @@ error:
|
|
}
|
|
}
|
|
|
|
|
|
/* Put PHYs in RESET to save power */
|
|
/* Put PHYs in RESET to save power */
|
|
- gpiod_set_value_cansleep(bus->reset_gpiod, 1);
|
|
|
|
|
|
+ if (bus->reset_gpiod)
|
|
|
|
+ gpiod_set_value_cansleep(bus->reset_gpiod, 1);
|
|
|
|
|
|
device_del(&bus->dev);
|
|
device_del(&bus->dev);
|
|
return err;
|
|
return err;
|
|
@@ -424,7 +425,8 @@ void mdiobus_unregister(struct mii_bus *bus)
|
|
}
|
|
}
|
|
|
|
|
|
/* Put PHYs in RESET to save power */
|
|
/* Put PHYs in RESET to save power */
|
|
- gpiod_set_value_cansleep(bus->reset_gpiod, 1);
|
|
|
|
|
|
+ if (bus->reset_gpiod)
|
|
|
|
+ gpiod_set_value_cansleep(bus->reset_gpiod, 1);
|
|
|
|
|
|
device_del(&bus->dev);
|
|
device_del(&bus->dev);
|
|
}
|
|
}
|