From: jbrunet Date: Mon, 19 Dec 2016 15:05:36 +0000 (+0100) Subject: net: phy: fix sign type error in genphy_config_eee_advert X-Git-Tag: v4.9.36~116 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40373d91a0f764c8ba5c56ea3dc88896faa4510d;p=platform%2Fkernel%2Flinux-amlogic.git net: phy: fix sign type error in genphy_config_eee_advert [ Upstream commit 3bb9ab63276696988d8224f52db20e87194deb4b ] 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 Signed-off-by: Jerome Brunet Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index b14fcf6..d9ec748 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -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)