Commit caef3e0b authored by Antoine Tenart's avatar Antoine Tenart Committed by Kishon Vijay Abraham I

phy: mvebu-cp110-comphy: fix mux error check

The mux value is retrieved from the mvebu_comphy_get_mux() function
which returns an int. In mvebu_comphy_power_on() this int is stored to a
u32 and a check is made to ensure it's not negative. Which is wrong.
This fixes it.

Fixes: d0438bd6 ("phy: add the mvebu cp110 comphy driver")
Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parent 554a56fc
...@@ -468,8 +468,8 @@ static int mvebu_comphy_power_on(struct phy *phy) ...@@ -468,8 +468,8 @@ static int mvebu_comphy_power_on(struct phy *phy)
{ {
struct mvebu_comphy_lane *lane = phy_get_drvdata(phy); struct mvebu_comphy_lane *lane = phy_get_drvdata(phy);
struct mvebu_comphy_priv *priv = lane->priv; struct mvebu_comphy_priv *priv = lane->priv;
int ret; int ret, mux;
u32 mux, val; u32 val;
mux = mvebu_comphy_get_mux(lane->id, lane->port, lane->mode); mux = mvebu_comphy_get_mux(lane->id, lane->port, lane->mode);
if (mux < 0) if (mux < 0)
......
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