summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
diff options
context:
space:
mode:
authorArnd Bergmann2016-02-10 16:09:02 +0100
committerDavid S. Miller2016-02-16 21:37:28 +0100
commit56bb7fd994f4cc163de08006bf68d959027a9f36 (patch)
tree8f6591932bb158fc845e119a0560b8827eff2e8d /drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
parentcxgb4: Add pci device id for chelsio t540 lom adapter (diff)
downloadkernel-qcow2-linux-56bb7fd994f4cc163de08006bf68d959027a9f36.tar.gz
kernel-qcow2-linux-56bb7fd994f4cc163de08006bf68d959027a9f36.tar.xz
kernel-qcow2-linux-56bb7fd994f4cc163de08006bf68d959027a9f36.zip
bridge: mdb: avoid uninitialized variable warning
A recent change to the mdb code confused the compiler to the point where it did not realize that the port-group returned from br_mdb_add_group() is always valid when the function returns a nonzero return value, so we get a spurious warning: net/bridge/br_mdb.c: In function 'br_mdb_add': net/bridge/br_mdb.c:542:4: error: 'pg' may be used uninitialized in this function [-Werror=maybe-uninitialized] __br_mdb_notify(dev, entry, RTM_NEWMDB, pg); Slightly rearranging the code in br_mdb_add_group() makes the problem go away, as gcc is clever enough to see that both functions check for 'ret != 0'. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 9e8430f8d60d ("bridge: mdb: Passing the port-group pointer to br_mdb module") Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c')
0 files changed, 0 insertions, 0 deletions