mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 14:50:19 +00:00
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: d0438bd6aa09 ("phy: add the mvebu cp110 comphy driver") Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
This commit is contained in:
parent
554a56fc83
commit
caef3e0b65
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user