Skip to content

Commit

Permalink
netfilter: xt_LED: don't output error message redundantly
Browse files Browse the repository at this point in the history
The function led_trigger_register() will only return -EEXIST when
error arises.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Duan Jiong authored and Pablo Neira Ayuso committed Jul 25, 2014
1 parent 5bd3a76 commit a2b60c7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/netfilter/xt_LED.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ static int led_tg_check(const struct xt_tgchk_param *par)

err = led_trigger_register(&ledinternal->netfilter_led_trigger);
if (err) {
pr_warning("led_trigger_register() failed\n");
if (err == -EEXIST)
pr_warning("Trigger name is already in use.\n");
pr_err("Trigger name is already in use.\n");
goto exit_alloc;
}

Expand Down

0 comments on commit a2b60c7

Please sign in to comment.