Commit a46fa260 authored by Dan Murphy's avatar Dan Murphy Committed by David S. Miller

net: phy: dp83867: Fix warning check for setting the internal delay

Fix warning: logical ‘or’ of collectively exhaustive tests is always true

Change the internal delay check from an 'or' condition to an 'and'
condition.
Reported-by: default avatarDavid Binderman <dcb314@hotmail.com>
Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bac541e4
...@@ -164,7 +164,7 @@ static int dp83867_config_init(struct phy_device *phydev) ...@@ -164,7 +164,7 @@ static int dp83867_config_init(struct phy_device *phydev)
return ret; return ret;
} }
if ((phydev->interface >= PHY_INTERFACE_MODE_RGMII_ID) || if ((phydev->interface >= PHY_INTERFACE_MODE_RGMII_ID) &&
(phydev->interface <= PHY_INTERFACE_MODE_RGMII_RXID)) { (phydev->interface <= PHY_INTERFACE_MODE_RGMII_RXID)) {
val = phy_read_mmd_indirect(phydev, DP83867_RGMIICTL, val = phy_read_mmd_indirect(phydev, DP83867_RGMIICTL,
DP83867_DEVADDR, phydev->addr); DP83867_DEVADDR, phydev->addr);
......
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