aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schiller <[email protected]>2024-06-11 15:54:32 +0200
committerJakub Kicinski <[email protected]>2024-06-13 17:07:11 -0700
commitb068706b7831ccf7c7f1a56a65862fbcc28d061f (patch)
tree453d9c38487f437af25719387807617fdb4b307e
parente6c34597f89ac98c06176eed57f125252015a330 (diff)
net: dsa: lantiq_gswip: Remove dead code from gswip_add_single_port_br()
The port validation in gswip_add_single_port_br() is superfluous and can be omitted. Suggested-by: Vladimir Oltean <[email protected]> Signed-off-by: Martin Schiller <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--drivers/net/dsa/lantiq_gswip.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
index cd88b00cfdc1..2bbc7dd45418 100644
--- a/drivers/net/dsa/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq_gswip.c
@@ -655,14 +655,8 @@ static int gswip_add_single_port_br(struct gswip_priv *priv, int port, bool add)
struct gswip_pce_table_entry vlan_active = {0,};
struct gswip_pce_table_entry vlan_mapping = {0,};
unsigned int cpu_port = priv->hw_info->cpu_port;
- unsigned int max_ports = priv->hw_info->max_ports;
int err;
- if (port >= max_ports) {
- dev_err(priv->dev, "single port for %i supported\n", port);
- return -EIO;
- }
-
vlan_active.index = port + 1;
vlan_active.table = GSWIP_TABLE_ACTIVE_VLAN;
vlan_active.key[0] = 0; /* vid */