linux-stable/drivers/net
Arnd Bergmann 415b6f19e8 net: bnxt: always return values from _bnxt_get_max_rings
Newly added code in the bnxt driver uses a couple of variables that
are never initialized when CONFIG_BNXT_SRIOV is not set, and gcc
correctly warns about that:

In file included from include/linux/list.h:8:0,
                 from include/linux/module.h:9,
                 from drivers/net/ethernet/broadcom/bnxt/bnxt.c:10:
drivers/net/ethernet/broadcom/bnxt/bnxt.c: In function 'bnxt_get_max_rings':
include/linux/kernel.h:794:26: warning: 'cp' may be used uninitialized in this function [-Wmaybe-uninitialized]
include/linux/kernel.h:794:26: warning: 'tx' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/net/ethernet/broadcom/bnxt/bnxt.c:5730:11: warning: 'rx' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/net/ethernet/broadcom/bnxt/bnxt.c:5736:6: note: 'rx' was declared here

This changes the condition so that we fall back to using the PF
data if VF is not available, and always initialize the variables
to something useful.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 6e6c5a57fb ("bnxt_en: Modify bnxt_get_max_rings() to support shared or non shared rings.")
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-01-12 17:06:56 -05:00
..
appletalk
arcnet
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-11 23:55:43 -05:00
caif
can
cris
dsa dsa: mv88e6xxx: Add Second back of statistics 2015-12-23 22:17:00 -05:00
ethernet net: bnxt: always return values from _bnxt_get_max_rings 2016-01-12 17:06:56 -05:00
fddi
fjes
hamradio mkiss: fix scribble on freed memory 2016-01-06 15:06:27 -05:00
hippi
hyperv
ieee802154 ieee802154: cc2520: Check CRC & add promiscuous 2016-01-03 09:17:42 +01:00
ipvlan
irda irda: toim3232-sir: delete some dead code 2016-01-08 13:25:33 -05:00
phy phy: remove an unneeded condition 2016-01-12 11:51:58 -05:00
plip net: plip: use new parport device model 2016-01-09 21:02:05 -05:00
ppp
slip
team
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-11 23:55:43 -05:00
vmxnet3 Driver: Vmxnet3: Fix regression caused by 5738a09 2016-01-06 16:20:13 -05:00
wan
wimax
wireless brcmfmac: Do not handle link downs for ibss. 2016-01-08 10:44:48 +02:00
xen-netback xen: bug fixes for 4.4-rc5 2015-12-18 12:24:52 -08:00
dummy.c
eql.c
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-11 23:55:43 -05:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c
veth.c veth: don’t modify ip_summed; doing so treats packets with bad checksums as good. 2015-12-22 15:15:34 -05:00
virtio_net.c
vrf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-06 22:54:18 -05:00
vxlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-11 23:55:43 -05:00
xen-netfront.c