Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47d20212 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by David S. Miller
Browse files

net: phy: mscc: fix memory leak in vsc8574_config_pre_init



In case memory resources for *fw* were successfully allocated,
release them before return.

Addresses-Coverity-ID: 1473968 ("Resource leak")
Fixes: 00d70d8e ("net: phy: mscc: add support for VSC8574 PHY")
Reviewed-by: default avatarQuentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e519869a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1292,7 +1292,7 @@ static int vsc8574_config_pre_init(struct phy_device *phydev)
				dev_err(dev,
					"%s: failed to assert reset of micro\n",
					__func__);
				return ret;
				goto out;
			}
		}
	} else {