Skip to content

Commit

Permalink
net: phy: dp83867: Fix warning check for setting the internal delay
Browse files Browse the repository at this point in the history
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: David Binderman <[email protected]>
Signed-off-by: Dan Murphy <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Dan Murphy authored and davem330 committed Jul 22, 2015
1 parent bac541e commit a46fa26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/dp83867.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static int dp83867_config_init(struct phy_device *phydev)
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)) {
val = phy_read_mmd_indirect(phydev, DP83867_RGMIICTL,
DP83867_DEVADDR, phydev->addr);
Expand Down

0 comments on commit a46fa26

Please sign in to comment.