net: phy: fix sign type error in genphy_config_eee_advert
authorjbrunet <jbrunet@baylibre.com>
Mon, 19 Dec 2016 15:05:36 +0000 (16:05 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 03:04:33 +0000 (03:04 +0000)
commit3d2033a2f0e27d3e9be65743a6f0826dec72fdfe
treed26ba9a2b181955b24b8a4dedc098c228974b451
parent1c06158359d6417476af2c13d1bd293cbf03ba89
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 <julia.lawall@lip6.fr>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/phy_device.c