summaryrefslogtreecommitdiff
path: root/drivers/net/team/team.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-06-05 15:56:43 -0700
committerDavid S. Miller <davem@davemloft.net>2013-06-05 16:37:30 -0700
commit6bc19fb82d4c05a9eee19d6d2aab2ce26e499ec2 (patch)
tree8b049ef383307f5dae91b5c9cf78dbfb9b74a4d1 /drivers/net/team/team.c
parent11a164a04382d735230b01f4cc46ad78a7c4abf6 (diff)
parent4d3797d7e1861ac1af150a6189315786c5e1c820 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge 'net' bug fixes into 'net-next' as we have patches that will build on top of them. This merge commit includes a change from Emil Goode (emilgoode@gmail.com) that fixes a warning that would have been introduced by this merge. Specifically it fixes the pingv6_ops method ipv6_chk_addr() to add a "const" to the "struct net_device *dev" argument and likewise update the dummy_ipv6_chk_addr() declaration. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team/team.c')
-rw-r--r--drivers/net/team/team.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 9273f48a512b..04e9adb748c5 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2374,7 +2374,8 @@ static int team_nl_send_port_list_get(struct team *team, u32 portid, u32 seq,
bool incomplete;
int i;
- port = list_first_entry(&team->port_list, struct team_port, list);
+ port = list_first_entry_or_null(&team->port_list,
+ struct team_port, list);
start_again:
err = __send_and_alloc_skb(&skb, team, portid, send_func);
@@ -2402,8 +2403,8 @@ start_again:
err = team_nl_fill_one_port_get(skb, one_port);
if (err)
goto errout;
- } else {
- list_for_each_entry(port, &team->port_list, list) {
+ } else if (port) {
+ list_for_each_entry_from(port, &team->port_list, list) {
err = team_nl_fill_one_port_get(skb, port);
if (err) {
if (err == -EMSGSIZE) {