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: 00d70d8e0e
("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>
This commit is contained in:
Родитель
e519869af3
Коммит
47d20212aa
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче