net: dsa: mv88e6xxx: return NULL when no PCS is present
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 16 Oct 2024 09:58:29 +0000 (10:58 +0100)
committerAndrew Lunn <andrew@lunn.ch>
Thu, 17 Oct 2024 23:15:15 +0000 (18:15 -0500)
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) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
drivers/net/dsa/mv88e6xxx/chip.c

index f68233d24f32beb50b30673fbd226a3d6f9c4b0d..da19a3b055496833206715613bc8480749884977 100644 (file)
@@ -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,