aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-09-30 18:13:49 +0200
committerDavid S. Miller <davem@davemloft.net>2016-10-03 01:31:48 -0400
commitfa34cd94fb01fcb8d79d91e009451b37692e94e5 (patch)
tree30bdaa265f90d8bd7319b0db866fd48b63c4df94 /drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
parent63d75463c91a5b5be7c0aca11ceb45ea5a0ae81d (diff)
downloadlinux-stericsson-fa34cd94fb01fcb8d79d91e009451b37692e94e5.tar.gz
net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling
With the newly added support for IFLA_VF_VLAN_LIST netlink messages, we get a warning about potential uninitialized variable use in the parsing of the user input when enabling the -Wmaybe-uninitialized warning: net/core/rtnetlink.c: In function 'do_setvfinfo': net/core/rtnetlink.c:1756:9: error: 'ivvl$' may be used uninitialized in this function [-Werror=maybe-uninitialized] I have not been able to prove whether it is possible to arrive in this code with an empty IFLA_VF_VLAN_LIST block, but if we do, then ndo_set_vf_vlan gets called with uninitialized arguments. This adds an explicit check for an empty list, making it obvious to the reader and the compiler that this cannot happen. Fixes: 79aab093a0b5 ("net: Update API for VF vlan protocol 802.1ad support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Moshe Shemesh <moshe@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c')
0 files changed, 0 insertions, 0 deletions