diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-01-14 10:35:56 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-14 16:47:21 -0800 |
commit | c612fe7808033ca2c7000fa06a4abb12a5e3e253 (patch) | |
tree | bd2d3af189750cd7195f8d41789c449968e611e7 | |
parent | a5317f3b06b3afe7906785dc5912aca3058cfdc2 (diff) |
net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add
prestera_bridge_port_vlan_add should have been called with vlan->vid,
however this was masked by the presence of the local vid variable and I
did not notice the build warning.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: b7a9e0da2d1c ("net: switchdev: remove vid_begin -> vid_end range from VLAN objects")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Taras Chornyi <tchornyi@marvell.com>
Link: https://lore.kernel.org/r/20210114083556.2274440-1-olteanv@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/marvell/prestera/prestera_switchdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c index beb6447fbe40..8c2b03151736 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c @@ -1007,7 +1007,6 @@ static int prestera_port_vlans_add(struct prestera_port *port, struct prestera_bridge_port *br_port; struct prestera_switch *sw = port->sw; struct prestera_bridge *bridge; - u16 vid; if (netif_is_bridge_master(dev)) return 0; @@ -1021,7 +1020,7 @@ static int prestera_port_vlans_add(struct prestera_port *port, return 0; return prestera_bridge_port_vlan_add(port, br_port, - vid, flag_untagged, + vlan->vid, flag_untagged, flag_pvid, extack); } |