diff options
| author | Daniel Golle <[email protected]> | 2024-10-13 14:16:44 +0100 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-10-15 09:53:53 -0700 |
| commit | 57c28e93694de1d95dfdc70ea5c0e3008b3376f7 (patch) | |
| tree | dabdba782ab98dadffdd9b3e1a6108b679a5d05e | |
| parent | a581ed81940db0244eae5a8078345f3dcd88f0c6 (diff) | |
net: phy: aquantia: fix return value check in aqr107_config_mdi()
of_property_read_u32() returns -EINVAL in case the property cannot be
found rather than -ENOENT. Fix the check to not abort probing in case
of the property being missing, and also in case CONFIG_OF is not set
which will result in -ENOSYS.
Fixes: a2e1ba275eae ("net: phy: aquantia: allow forcing order of MDI pairs")
Reported-by: Jon Hunter <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Suggested-by: Hans-Frieder Vogt <[email protected]>
Signed-off-by: Daniel Golle <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Reviewed-by: Jon Hunter <[email protected]>
Tested-by: Jon Hunter <[email protected]>
Link: https://patch.msgid.link/f8282e2fc6a5ac91fe91491edc7f1ca8f4a65a0d.1728825323.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <[email protected]>
| -rw-r--r-- | drivers/net/phy/aquantia/aquantia_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c index 4feb3b98c9da..38d0dd5c80a4 100644 --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c @@ -513,7 +513,7 @@ static int aqr107_config_mdi(struct phy_device *phydev) ret = of_property_read_u32(np, "marvell,mdi-cfg-order", &mdi_conf); /* Do nothing in case property "marvell,mdi-cfg-order" is not present */ - if (ret == -ENOENT) + if (ret == -EINVAL || ret == -ENOSYS) return 0; if (ret) |