diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-10-18 00:16:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-18 14:20:36 -0400 |
commit | 52ccd6318481a467d8ad54ea40f60c61e957d58f (patch) | |
tree | a46c349e5eda98851b968156a82b5239eb585806 /drivers/net/ethernet/rocker | |
parent | 4b75ca5a7a9e01dda3ea70bc17b1826fd679af61 (diff) | |
download | linux-52ccd6318481a467d8ad54ea40f60c61e957d58f.tar.bz2 |
net/hyperv: avoid uninitialized variable
The hdr_offset variable is only if we deal with a TCP or UDP packet,
but as the check surrounding its usage tests for skb_is_gso()
instead, the compiler has no idea if the variable is initialized
or not at that point:
drivers/net/hyperv/netvsc_drv.c: In function ‘netvsc_start_xmit’:
drivers/net/hyperv/netvsc_drv.c:494:42: error: ‘hdr_offset’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
This adds an additional check for the transport type, which
tells the compiler that this path cannot happen. Since the
get_net_transport_info() function should always be inlined
here, I don't expect this to result in additional runtime
checks.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/rocker')
0 files changed, 0 insertions, 0 deletions