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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Dec 2016 18:50:49 +0000 (13:50 -0500)
commit3bb9ab63276696988d8224f52db20e87194deb4b
tree1ce8aae62636d72ccac8079fb1e2306dfb29a3e2
parent0a28cfd51e17f4f0a056bcf66bfbe492c3b99f38
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>
drivers/net/phy/phy_device.c