Commit 50d5aa4c authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

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: 9f70eb33 ("net: ethernet: renesas: ravb: fix fixed-link phydev leaks")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 33d446db
...@@ -1016,8 +1016,6 @@ static int ravb_phy_init(struct net_device *ndev) ...@@ -1016,8 +1016,6 @@ static int ravb_phy_init(struct net_device *ndev)
* at this time. * at this time.
*/ */
if (priv->chip_id == RCAR_GEN3) { if (priv->chip_id == RCAR_GEN3) {
int err;
err = phy_set_max_speed(phydev, SPEED_100); err = phy_set_max_speed(phydev, SPEED_100);
if (err) { if (err) {
netdev_err(ndev, "failed to limit PHY to 100Mbit/s\n"); netdev_err(ndev, "failed to limit PHY to 100Mbit/s\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment