提交 3bb9ab63 编写于 作者: J jbrunet 提交者: David S. Miller

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: d853d145 ("net: phy: add an option to disable EEE advertisement")
Reported-by: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0a28cfd5
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册