Commit 47d20212 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by 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: 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
......@@ -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 {
......
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