diff options
author | jbrunet <jbrunet@baylibre.com> | 2016-12-19 16:05:36 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-20 13:50:49 -0500 |
commit | 3bb9ab63276696988d8224f52db20e87194deb4b (patch) | |
tree | 1ce8aae62636d72ccac8079fb1e2306dfb29a3e2 /drivers | |
parent | 0a28cfd51e17f4f0a056bcf66bfbe492c3b99f38 (diff) | |
download | linux-3bb9ab63276696988d8224f52db20e87194deb4b.tar.bz2 |
net: phy: fix sign type error in genphy_config_eee_advert
In genphy_config_eee_advert, the return value of phy_read_mmd_indirect is
checked to know if the register could be accessed but the result is
assigned to a 'u32'.
Changing to 'int' to correctly get errors from phy_read_mmd_indirect.
Fixes: d853d145ea3e ("net: phy: add an option to disable EEE advertisement")
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/phy_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 9c06f8028f0c..ee5ebadb1463 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -1187,8 +1187,8 @@ static int genphy_config_advert(struct phy_device *phydev) */ static int genphy_config_eee_advert(struct phy_device *phydev) { - u32 broken = phydev->eee_broken_modes; - u32 old_adv, adv; + int broken = phydev->eee_broken_modes; + int old_adv, adv; /* Nothing to disable */ if (!broken) |