[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a8c2w55e.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>
Date: Sun, 11 Dec 2016 16:02:37 -0500
From: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
To: Andrew Lunn <andrew@...n.ch>, David Miller <davem@...emloft.net>
Cc: netdev <netdev@...r.kernel.org>, Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH net] net: dsa: mv88e6xxx: Fix opps when adding vlan bridge
Hi Andrew,
Andrew Lunn <andrew@...n.ch> writes:
> @@ -1804,6 +1807,9 @@ static int mv88e6xxx_port_check_hw_vlan(struct dsa_switch *ds, int port,
> chip->ports[port].bridge_dev)
> break; /* same bridge, check next VLAN */
>
> + if (!chip->ports[i].bridge_dev)
> + continue;
> +
The above truncated test:
if (chip->ports[i].bridge_dev ==
chip->ports[port].bridge_dev)
break; /* same bridge, check next VLAN */
should handle the case where bridge_dev is NULL, but if you want to
explicitly test it, I'd move it before this statement.
> netdev_warn(ds->ports[port].netdev,
> "hardware VLAN %d already used by %s\n",
> vlan.vid,
Thanks,
Vivien
Powered by blists - more mailing lists