]> Git Repo - u-boot.git/blobdiff - drivers/phy/nop-phy.c
Merge tag 'u-boot-rockchip-20230731' of https://source.denx.de/u-boot/custodians...
[u-boot.git] / drivers / phy / nop-phy.c
index e2ee6e92068e9c8031297a350a629104575a3d4f..d0904f4f075b86d14864952eda5031d45103a8cc 100644 (file)
@@ -45,11 +45,13 @@ static int nop_phy_init(struct phy *phy)
 
 #if CONFIG_IS_ENABLED(DM_GPIO)
        /* Take phy out of reset */
-       ret = dm_gpio_set_value(&priv->reset_gpio, false);
-       if (ret) {
-               if (CONFIG_IS_ENABLED(CLK))
-                       clk_disable_bulk(&priv->bulk);
-               return ret;
+       if (dm_gpio_is_valid(&priv->reset_gpio)) {
+               ret = dm_gpio_set_value(&priv->reset_gpio, false);
+               if (ret) {
+                       if (CONFIG_IS_ENABLED(CLK))
+                               clk_disable_bulk(&priv->bulk);
+                       return ret;
+               }
        }
 #endif
        return 0;
This page took 0.027366 seconds and 4 git commands to generate.