From: Kenneth Williams Date: Mon, 12 Jan 2015 00:43:54 +0000 (-0800) Subject: team: Remove dead code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e350a96ec9e6c74f06235ded93ef3155f71c6c6b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git team: Remove dead code 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 Acked-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 93e224217e24..43bcfff71d95 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -176,7 +176,6 @@ 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) { @@ -184,12 +183,6 @@ static int __team_option_inst_add_option(struct team *team, 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: