summaryrefslogtreecommitdiffstats
path: root/drivers/phy
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@free-electrons.com>2017-09-18 10:04:20 +0200
committerKishon Vijay Abraham I <kishon@ti.com>2017-09-26 13:32:48 +0200
commitcaef3e0b657d091a540232e07e5e5b4648110a52 (patch)
tree8f4686bbfd748ac082edc984782883c8f132182b /drivers/phy
parentphy: phy-mtk-tphy: fix NULL point of chip bank (diff)
downloadlinux-caef3e0b657d091a540232e07e5e5b4648110a52.tar.xz
linux-caef3e0b657d091a540232e07e5e5b4648110a52.zip
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>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/marvell/phy-mvebu-cp110-comphy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/phy/marvell/phy-mvebu-cp110-comphy.c b/drivers/phy/marvell/phy-mvebu-cp110-comphy.c
index 73ebad6634a7..514a1a47e1fd 100644
--- a/drivers/phy/marvell/phy-mvebu-cp110-comphy.c
+++ b/drivers/phy/marvell/phy-mvebu-cp110-comphy.c
@@ -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_priv *priv = lane->priv;
- int ret;
- u32 mux, val;
+ int ret, mux;
+ u32 val;
mux = mvebu_comphy_get_mux(lane->id, lane->port, lane->mode);
if (mux < 0)