Skip to content

Commit

Permalink
team: Remove dead code
Browse files Browse the repository at this point in the history
The deleted lines are called from a function which is called:
1) Only through __team_options_register via team_options_register and
2) Only during initialization / mode initialization when there are no
ports attached.
Therefore the ports list is guarenteed to be empty and this code will
never be executed.

Signed-off-by: Kenneth Williams <ken@williamsclan.us>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kenneth Williams authored and David S. Miller committed Jan 12, 2015
1 parent b1e8bc6 commit e350a96
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,13 @@ static int __team_option_inst_add(struct team *team, struct team_option *option,
static int __team_option_inst_add_option(struct team *team,
struct team_option *option)
{
struct team_port *port;
int err;

if (!option->per_port) {
err = __team_option_inst_add(team, option, NULL);
if (err)
goto inst_del_option;
}

list_for_each_entry(port, &team->port_list, list) {
err = __team_option_inst_add(team, option, port);
if (err)
goto inst_del_option;
}
return 0;

inst_del_option:
Expand Down

0 comments on commit e350a96

Please sign in to comment.