[PATCH] net: cortina_ni: Fix typo accessing wrong phy

Andrew Goodbody andrew.goodbody at linaro.org
Fri Aug 1 13:59:40 CEST 2025


In ca_phy_probe when checking for an external phy it uses a field from
the internal phy due to what is assumed to be a copy/paste typo. Make
the obvious fix to use the field from the external phy.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
---
 drivers/net/cortina_ni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cortina_ni.c b/drivers/net/cortina_ni.c
index 79026882800..21b7089176c 100644
--- a/drivers/net/cortina_ni.c
+++ b/drivers/net/cortina_ni.c
@@ -499,7 +499,7 @@ static int ca_phy_probe(struct udevice *dev)
 				 dev, priv->phy_interface);
 	if (ext_phydev) {
 		ext_phydev->supported &= PHY_GBIT_FEATURES;
-		ext_phydev->advertising = int_phydev->supported;
+		ext_phydev->advertising = ext_phydev->supported;
 		phy_config(ext_phydev);
 	} else {
 		printf("CA NI %s: There is no external phy device\n", __func__);

---
base-commit: f5e968a28e7cdc2c4365f5a382e02f074ee03fac
change-id: 20250801-net_cortina_ni-43e659440049

Best regards,
-- 
Andrew Goodbody <andrew.goodbody at linaro.org>



More information about the U-Boot mailing list