linux-stable/drivers/net/ethernet
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
..
3com Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-21 16:01:54 -04:00
8390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-21 16:01:54 -04:00
adaptec
aeroflex
agere
alacritech
allwinner
alteon net: alteon: acenic: remove redundant pointer rxdesc 2018-07-04 22:39:10 +09:00
altera
amazon treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
amd net: Remove depends on HAS_DMA in case of platform dependency 2018-06-23 10:44:30 +09:00
apm net: Remove depends on HAS_DMA in case of platform dependency 2018-06-23 10:44:30 +09:00
apple
aquantia net: aquantia: Make some functions static 2018-07-05 19:29:51 +09:00
arc net: Remove depends on HAS_DMA in case of platform dependency 2018-06-23 10:44:30 +09:00
atheros net: alx: remove redundant variable old_duplex 2018-07-04 22:39:10 +09:00
aurora net: ethernet: Make NET_VENDOR_AURORA default to yes 2018-07-05 20:05:54 +09:00
broadcom bnxt_en: Add bnxt_en initial params table and register it. 2018-07-05 19:58:35 +09:00
brocade treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
cadence net: ethernet: Add missing VENDOR to Cadence and Packet Engines symbols 2018-07-05 20:05:54 +09:00
calxeda net: Remove depends on HAS_DMA in case of platform dependency 2018-06-23 10:44:30 +09:00
cavium liquidio: fix kernel panic when NIC firmware is older than 1.7.2 2018-07-07 11:10:35 +09:00
chelsio cxgb4: Fix the condition to check if the card is T5 2018-07-05 20:14:29 +09:00
cirrus
cisco enic: do not overwrite error code 2018-06-20 08:10:13 +09:00
cortina net: drivers/net: Convert random_ether_addr to eth_random_addr 2018-06-23 10:49:14 +09:00
davicom
dec
dlink
emulex be2net: Fix error detection logic for BE3 2018-05-29 10:57:25 -04:00
ezchip
faraday net/ncsi: Silence debug messages 2018-06-20 07:26:58 +09:00
freescale net: ethernet: gianfar_ethtool: remove redundant variable last_rule_idx 2018-07-04 22:39:11 +09:00
fujitsu
hisilicon net: hns3: Prevent sending command during global or core reset 2018-07-07 11:13:07 +09:00
hp
huawei net: hinic: remove redundant pointer pfhwdev 2018-07-04 22:39:11 +09:00
i825xx
ibm treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
intel igb: Add support for ETF offload 2018-07-04 22:30:28 +09:00
marvell net: mvpp2: Use htons when checking protocol info 2018-06-30 18:54:09 +09:00
mediatek
mellanox mlxsw: spectrum_router: avoid uninitialized variable access 2018-07-07 20:06:08 +09:00
micrel ethernet: micrel: remove redundant pointer 'info' 2018-07-04 22:39:11 +09:00
microchip net: drivers/net: Convert random_ether_addr to eth_random_addr 2018-06-23 10:49:14 +09:00
moxa treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
mscc net: mscc: ocelot: add VLAN filtering 2018-06-28 14:18:49 +09:00
myricom
natsemi net/sonic: Use dma_mapping_error() 2018-05-31 14:17:33 -04:00
neterion treewide: Use array_size() in vzalloc() 2018-06-12 16:19:22 -07:00
netronome Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-07-04 08:53:53 +09:00
ni treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
nuvoton
nvidia treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
nxp
oki-semi net: pch_gbe: Clean up pch_gbe_set_multi 2018-06-23 20:52:09 +09:00
packetengines net: ethernet: Add missing VENDOR to Cadence and Packet Engines symbols 2018-07-05 20:05:54 +09:00
pasemi treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
qlogic qlogic: netxen: remove various redundant variables 2018-07-05 20:03:29 +09:00
qualcomm net: drivers/net: Convert random_ether_addr to eth_random_addr 2018-06-23 10:49:14 +09:00
rdc
realtek r8169: fix runtime suspend 2018-07-05 13:24:32 +09:00
renesas sh_eth: fix *enum* {A|M}PR_BIT 2018-06-28 16:02:04 +09:00
rocker rocker: rocker_main: Ignore bridge VLAN events 2018-05-31 14:13:43 -04:00
samsung
seeq
sfc net: ethernet: sfc: Make subdir logic consistent with other vendors 2018-07-05 20:05:54 +09:00
sgi
silan
sis
smsc epic100: remove redundant variable 'irq' 2018-07-04 22:39:11 +09:00
socionext net: socionext: remove redundant pointer ndev 2018-07-05 19:30:26 +09:00
stmicro net: stmmac_tc: use 64-bit arithmetic instead of 32-bit 2018-07-03 23:21:07 +09:00
sun net: ethernet: sun: remove redundant variables adv and lpa and mii_reads 2018-07-05 20:07:40 +09:00
synopsys
tehuti net: tehuti: remove redundant pointer skb 2018-07-05 19:33:39 +09:00
ti net: drivers/net: Convert random_ether_addr to eth_random_addr 2018-06-23 10:49:14 +09:00
toshiba treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
tundra
via
wiznet
xilinx net: emaclite: Remove unnecessary spaces 2018-06-30 20:15:45 +09:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
fealnx.c
jme.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
jme.h
Kconfig net: ethernet: Sort Kconfig sourcing alphabetically 2018-05-21 12:14:47 -04:00
korina.c
lantiq_etop.c
Makefile net: ethernet: sfc: Make subdir logic consistent with other vendors 2018-07-05 20:05:54 +09:00
netx-eth.c