net: renesas: ravb: unintialized return value
Subsystems (4)
PATCH 1/1 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.
---
Applies to the net tree for 4.10.
drivers/net/ethernet/renesas/ravb_main.c +0 -2
@@ -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" );
Hello!
Quoted 5 lines · Dan Carpenter
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")
Hm, I somehow missed this one, probably due to the horrific CC list. :-(
Quoted 1 line
Signed-off-by Dan Carpenter <[email protected]>
MBR, Sergei
Quoted 5 lines · Dan Carpenter
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 <[email protected]>
Thanks for catching this.
Johan
From: Dan Carpenter <[email protected]>
Date: Thu, 1 Dec 2016 23:57:44 +0300
Quoted 6 lines
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 <[email protected]>
Applied.