Commit 40373d91 authored by jbrunet's avatar jbrunet Committed by Greg Kroah-Hartman

net: phy: fix sign type error in genphy_config_eee_advert


[ Upstream commit 3bb9ab63 ]

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: d853d145 ("net: phy: add an option to disable EEE advertisement")
Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 752ba680
......@@ -1155,8 +1155,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)
......
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