diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-10-16 19:37:35 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-18 07:08:55 +0200 |
commit | 47d20212aa1c64f52aba0c5409d03c22bf25cd66 (patch) | |
tree | 0e58e9ab8b78310f52274ad50164542e543c6271 | |
parent | net: phy: mscc: fix signedness bug in vsc85xx_downshift_get (diff) | |
download | linux-47d20212aa1c64f52aba0c5409d03c22bf25cd66.tar.xz linux-47d20212aa1c64f52aba0c5409d03c22bf25cd66.zip |
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: 00d70d8e0e78 ("net: phy: mscc: add support for VSC8574 PHY")
Reviewed-by: Quentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/mscc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c index bff56c343448..a2e59f4f6f01 100644 --- a/drivers/net/phy/mscc.c +++ b/drivers/net/phy/mscc.c @@ -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 { |