linux-stable/drivers/net
Arnd Bergmann be9c64b19b mlxsw: spectrum_router: avoid uninitialized variable access
When CONFIG_BRIDGE_VLAN_FILTERING is disabled, gcc correctly points out
that the 'vid' variable is uninitialized whenever br_vlan_get_pvid
returns an error:

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c: In function 'mlxsw_sp_rif_vlan_fid_get':
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:6881:6: error: 'vid' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This changes the condition check to always return -EINVAL here,
which I guess is what the author intended here.

Fixes: e6f1960ae6 ("mlxsw: spectrum_router: Allocate FID according to PVID")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-07-07 20:06:08 +09:00
..
appletalk
arcnet
bonding treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
caif
can treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
dsa net: dsa: vsc73xx: Make some functions static 2018-07-05 19:29:29 +09:00
ethernet mlxsw: spectrum_router: avoid uninitialized variable access 2018-07-07 20:06:08 +09:00
fddi net: fddi: fix a possible null-ptr-deref 2018-06-08 18:47:46 -04:00
fjes fjes: use currently unused variable my_epid and max_epid 2018-07-05 19:34:21 +09:00
hamradio net/hamradio/6pack: remove redundant variable channel 2018-07-05 19:34:45 +09:00
hippi treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
hyperv hv_netvsc: split sub-channel setup into async and sync 2018-06-30 21:28:36 +09:00
ieee802154
ipvlan ipvlan: call dev_change_flags when ipvlan mode is reset 2018-07-02 20:38:09 +09:00
netdevsim netdevsim: fix sa_idx out of bounds check 2018-07-02 20:35:33 +09:00
phy net: phy: vitesse: Add support for VSC73xx 2018-07-04 11:30:02 +09:00
plip
ppp Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL 2018-06-28 10:40:47 -07:00
slip treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
team treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
usb net: usb: asix: allow optionally getting mac address from device tree 2018-07-04 22:09:23 +09:00
vmxnet3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-21 16:01:54 -04:00
wan treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
wimax
wireless This round's updates: 2018-06-30 21:08:12 +09:00
xen-netback treewide: Use array_size() in vzalloc() 2018-06-12 16:19:22 -07:00
Kconfig virtio_net: Extend virtio to use VF datapath when available 2018-05-28 22:59:54 -04:00
LICENSE.SRC
Makefile net: Introduce net_failover driver 2018-05-28 22:59:54 -04:00
Space.c
dummy.c
eql.c
geneve.c Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-07-03 10:29:26 +09:00
gtp.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
ifb.c ifb: fix packets checksum 2018-05-28 23:02:22 -04:00
loopback.c
macsec.c
macvlan.c
macvtap.c
mdio.c
mii.c
net_failover.c net: net_failover: fix typo in net_failover_slave_register() 2018-06-20 07:56:44 +09:00
netconsole.c
nlmon.c
ntb_netdev.c net: drivers/net: Convert random_ether_addr to eth_random_addr 2018-06-23 10:49:14 +09:00
rionet.c
sb1000.c
sungem_phy.c
tap.c net: in virtio_net_hdr only add VLAN_HLEN to csum_start if payload holds vlan 2018-06-07 16:15:38 -04:00
thunderbolt.c
tun.c net: in virtio_net_hdr only add VLAN_HLEN to csum_start if payload holds vlan 2018-06-07 16:15:38 -04:00
veth.c
virtio_net.c virtio_net: split XDP_TX kick and XDP_REDIRECT map flushing 2018-06-28 14:27:52 +09:00
vrf.c vrf: add CRC32c offload to device features 2018-05-28 22:55:13 -04:00
vsockmon.c
vxlan.c Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-07-03 10:29:26 +09:00
xen-netfront.c xen-netfront: Update features after registering netdev 2018-06-22 07:54:54 +09:00