summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/renesas/ravb_main.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-12-01 21:57:44 +0100
committerDavid S. Miller <davem@davemloft.net>2016-12-02 19:59:47 +0100
commit50d5aa4cf822887f88841e4d8f8502434af679a9 (patch)
tree85052b9f055108729afaec9f8ed4292fdda59e3d /drivers/net/ethernet/renesas/ravb_main.c
parentsh_eth: remove unchecked interrupts for RZ/A1 (diff)
downloadlinux-50d5aa4cf822887f88841e4d8f8502434af679a9.tar.xz
linux-50d5aa4cf822887f88841e4d8f8502434af679a9.zip
net: renesas: ravb: unintialized return value
We want to set the other "err" variable here so that we can return it later. My version of GCC misses this issue but I caught it with a static checker. Fixes: 9f70eb339f52 ("net: ethernet: renesas: ravb: fix fixed-link phydev leaks") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: Johan Hovold <johan@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas/ravb_main.c')
-rw-r--r--drivers/net/ethernet/renesas/ravb_main.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index f1f3be2cfe21..d6a217874a8b 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -1016,8 +1016,6 @@ static int ravb_phy_init(struct net_device *ndev)
* at this time.
*/
if (priv->chip_id == RCAR_GEN3) {
- int err;
-
err = phy_set_max_speed(phydev, SPEED_100);
if (err) {
netdev_err(ndev, "failed to limit PHY to 100Mbit/s\n");