linux/net/bridge
Arnd Bergmann 56bb7fd994 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: 9e8430f8d6 ("bridge: mdb: Passing the port-group pointer to br_mdb module")
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-16 15:37:28 -05:00
..
netfilter netfilter: nf_tables: release objects on netns destruction 2015-12-28 18:34:35 +01:00
Kconfig
Makefile
br.c switchdev: Require RTNL mutex to be held when sending FDB notifications 2016-01-28 16:21:31 -08:00
br_device.c bridge: fix lockdep addr_list_lock false positive splat 2016-01-15 15:40:45 -05:00
br_fdb.c switchdev: Pass original device to port netdev driver 2015-12-15 11:58:20 -05:00
br_forward.c bridge: set is_local and is_static before fdb entry is added to the fdb hashtable 2015-10-30 12:13:05 +09:00
br_if.c bridge: Propagate vlan add failure to user 2016-01-06 14:42:40 -05:00
br_input.c
br_ioctl.c
br_mdb.c bridge: mdb: avoid uninitialized variable warning 2016-02-16 15:37:28 -05:00
br_multicast.c
br_netfilter_hooks.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-10-17 14:28:03 +02:00
br_netfilter_ipv6.c
br_netlink.c netlink: Rightsize IFLA_AF_SPEC size calculation 2015-10-21 19:15:20 -07:00
br_nf_core.c
br_private.h bridge: vlan: move back vlan_flush 2015-10-13 04:57:58 -07:00
br_private_stp.h
br_stp.c switchdev: Pass original device to port netdev driver 2015-12-15 11:58:20 -05:00
br_stp_bpdu.c
br_stp_if.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-06 22:54:18 -05:00
br_stp_timer.c
br_sysfs_br.c bridge: use kobj_to_dev instead of to_dev 2015-12-23 22:26:48 -05:00
br_sysfs_if.c
br_vlan.c bridge: add vlan filtering change for new bridged device 2016-01-06 14:42:41 -05:00