team: don't print warn message on -ESRCH during event send
authorJiri Pirko <jiri@resnulli.us>
Thu, 23 Aug 2012 03:26:51 +0000 (03:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Aug 2012 17:46:39 +0000 (13:46 -0400)
When no one is listening on NL socket, -ESRCH is returned and warning
message is printed. This message is confusing people and in fact has no
meaning. So do not print it in this case.

Reported-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/team/team.c

index c8a3f108dc945c0dbbdabb7b42d286d9c2e34249..a5926c8584aa58406698991c174e54d756dc820b 100644 (file)
@@ -2486,7 +2486,7 @@ static void __team_options_change_check(struct team *team)
                        list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list);
        }
        err = team_nl_send_event_options_get(team, &sel_opt_inst_list);
-       if (err)
+       if (err && err != -ESRCH)
                netdev_warn(team->dev, "Failed to send options change via netlink (err %d)\n",
                            err);
 }
@@ -2517,9 +2517,9 @@ static void __team_port_change_check(struct team_port *port, bool linkup)
 
 send_event:
        err = team_nl_send_event_port_list_get(port->team);
-       if (err)
-               netdev_warn(port->team->dev, "Failed to send port change of device %s via netlink\n",
-                           port->dev->name);
+       if (err && err != -ESRCH)
+               netdev_warn(port->team->dev, "Failed to send port change of device %s via netlink (err %d)\n",
+                           port->dev->name, err);
 
 }