Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 767a1b5d authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman
Browse files

phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller



The phy-core allows phy_init and phy_power_on to be called multiple times,
but before this patch -ENOSUPP from phy_pm_runtime_get_sync would be
propagated to the caller for the 2nd and later calls.

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f40037fd
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -176,6 +176,8 @@ int phy_init(struct phy *phy)
			dev_err(&phy->dev, "phy init failed --> %d\n", ret);
			dev_err(&phy->dev, "phy init failed --> %d\n", ret);
			goto out;
			goto out;
		}
		}
	} else {
		ret = 0; /* Override possible ret == -ENOTSUPP */
	}
	}
	++phy->init_count;
	++phy->init_count;


@@ -232,6 +234,8 @@ int phy_power_on(struct phy *phy)
			dev_err(&phy->dev, "phy poweron failed --> %d\n", ret);
			dev_err(&phy->dev, "phy poweron failed --> %d\n", ret);
			goto out;
			goto out;
		}
		}
	} else {
		ret = 0; /* Override possible ret == -ENOTSUPP */
	}
	}
	++phy->power_count;
	++phy->power_count;
	mutex_unlock(&phy->mutex);
	mutex_unlock(&phy->mutex);