net: phy: mscc: Handle devm_phy_package_join() failure in vsc85xx_probe_common()
devm_phy_package_join() may fail and return a negative error code. Update vsc85xx_probe_common() to properly handle this failure by checking the return value and propagating the error to the caller. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20251112135715.1017117-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
eb47c5c488
commit
df39794319
@@ -2264,8 +2264,11 @@ static int vsc85xx_probe_common(struct phy_device *phydev,
|
||||
/* Set up package if needed */
|
||||
if (cfg->use_package) {
|
||||
vsc8584_get_base_addr(phydev);
|
||||
devm_phy_package_join(&phydev->mdio.dev, phydev,
|
||||
vsc8531->base_addr, cfg->shared_size);
|
||||
ret = devm_phy_package_join(&phydev->mdio.dev, phydev,
|
||||
vsc8531->base_addr,
|
||||
cfg->shared_size);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Configure LED settings */
|
||||
|
||||
Reference in New Issue
Block a user