summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Goodbody <andrew.goodbody@linaro.org>2025-08-01 12:59:40 +0100
committerJerome Forissier <jerome.forissier@linaro.org>2025-08-18 15:47:58 +0200
commit2cb9fef65bbb7535c1e27cef3122bb0b43e38b68 (patch)
tree36432773e7a0afd88fcfa4ec59a4254d6802a986
parent8f80e305792419000e141828cef7539eb3180fc9 (diff)
net: cortina_ni: Fix typo accessing wrong phy
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@linaro.org>
-rw-r--r--drivers/net/cortina_ni.c2
1 files changed, 1 insertions, 1 deletions
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__);