Am 24. Juli 2014 13:49:46 MESZ, schrieb Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>: >On Wed, Jul 23, 2014 at 02:19:09PM +0800, Duan Jiong wrote: >> >> The function led_trigger_register() will only return -EEXIST when >> error arises. >> >> Signed-off-by: Duan Jiong <duanj.fnst@xxxxxxxxxxxxxx> >> --- >> net/netfilter/xt_LED.c | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) >> >> diff --git a/net/netfilter/xt_LED.c b/net/netfilter/xt_LED.c >> index 993de2b..b47a58c 100644 >> --- a/net/netfilter/xt_LED.c >> +++ b/net/netfilter/xt_LED.c >> @@ -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_warning("Trigger name is already in use.\n"); > >This should be pr_err() since the rule fails to be loaded if >led_trigger_register() fails. I disagree with this patch, any error and EEXIST are two different things. > >-- >To unsubscribe from this list: send the line "unsubscribe >netfilter-devel" in >the body of a message to majordomo@xxxxxxxxxxxxxxx >More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html