Skip to content

Commit

Permalink
net: dsa: loop: Set correct number of ports
Browse files Browse the repository at this point in the history
We only support DSA_LOOP_NUM_PORTS in the switch, do not tell the DSA
core to allocate up to DSA_MAX_PORTS which is nearly the double (6 vs.
11).

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Aug 4, 2020
1 parent c99194e commit 947b6ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/dsa/dsa_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ static int dsa_loop_drv_probe(struct mdio_device *mdiodev)
return -ENOMEM;

ds->dev = &mdiodev->dev;
ds->num_ports = DSA_MAX_PORTS;
ds->num_ports = DSA_LOOP_NUM_PORTS;

ps = devm_kzalloc(&mdiodev->dev, sizeof(*ps), GFP_KERNEL);
if (!ps)
Expand Down

0 comments on commit 947b6ef

Please sign in to comment.