From: Russell King (Oracle) Date: Wed, 16 Oct 2024 09:58:29 +0000 (+0100) Subject: net: dsa: mv88e6xxx: return NULL when no PCS is present X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=14ca726ada7fd54a5640ad60ed4caa05df4203d4;p=users%2Fdwmw2%2Flinux.git net: dsa: mv88e6xxx: return NULL when no PCS is present Rather than returning an EOPNOTSUPP error pointer when the switch has no support for PCS, return NULL to indicate that no PCS is required. Signed-off-by: Russell King (Oracle) Signed-off-by: Andrew Lunn --- diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index f68233d24f32b..da19a3b055496 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -868,7 +868,7 @@ mv88e6xxx_mac_select_pcs(struct phylink_config *config, { struct dsa_port *dp = dsa_phylink_to_port(config); struct mv88e6xxx_chip *chip = dp->ds->priv; - struct phylink_pcs *pcs = ERR_PTR(-EOPNOTSUPP); + struct phylink_pcs *pcs = NULL; if (chip->info->ops->pcs_ops) pcs = chip->info->ops->pcs_ops->pcs_select(chip, dp->index,