提交 47d20212 编写于 作者: G Gustavo A. R. Silva 提交者: David S. Miller

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: NQuentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e519869a
...@@ -1292,7 +1292,7 @@ static int vsc8574_config_pre_init(struct phy_device *phydev) ...@@ -1292,7 +1292,7 @@ static int vsc8574_config_pre_init(struct phy_device *phydev)
dev_err(dev, dev_err(dev,
"%s: failed to assert reset of micro\n", "%s: failed to assert reset of micro\n",
__func__); __func__);
return ret; goto out;
} }
} }
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册