From: Vivien Didelot Date: Thu, 31 Oct 2019 02:09:18 +0000 (-0400) Subject: net: dsa: remove limitation of switch index value X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=27d4d19d7c82;p=linux.git net: dsa: remove limitation of switch index value Because there is no static array describing the links between switches anymore, we have no reason to force a limitation of the index value set by the device tree. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller --- diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index 371f15042dad0..ff2fa3950c629 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -711,8 +711,6 @@ static int dsa_switch_parse_member_of(struct dsa_switch *ds, return sz; ds->index = m[1]; - if (ds->index >= DSA_MAX_SWITCHES) - return -EINVAL; ds->dst = dsa_tree_touch(m[0]); if (!ds->dst)