summaryrefslogtreecommitdiffstats
path: root/fs/kernfs
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-01-12 16:05:08 +0100
committerDavid S. Miller <davem@davemloft.net>2016-01-12 17:06:56 -0500
commit415b6f19e87e350b13585591859d4fdf50772229 (patch)
tree6bcc818eec71427107185488086512f7d1dfe6a4 /fs/kernfs
parent229394e8e62a4191d592842cf67e80c62a492937 (diff)
downloadlinux-415b6f19e87e350b13585591859d4fdf50772229.tar.bz2
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: 6e6c5a57fbe1 ("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>
Diffstat (limited to 'fs/kernfs')
0 files changed, 0 insertions, 0 deletions