[NETFILTER]: x_tables: fix return values for LOG/ULOG
[deliverable/linux.git] / net / ipv4 / netfilter / ipt_ULOG.c
index dbd34783a64d0e233989a869b4e934f75255ac48..a47e279eaac2c09f3f175afac3e4720654f3ed7c 100644 (file)
@@ -379,7 +379,7 @@ static struct nf_logger ipt_ulog_logger = {
 
 static int __init ipt_ulog_init(void)
 {
-       int i;
+       int ret, i;
 
        DEBUGP("ipt_ULOG: init module\n");
 
@@ -400,9 +400,10 @@ static int __init ipt_ulog_init(void)
        if (!nflognl)
                return -ENOMEM;
 
-       if (ipt_register_target(&ipt_ulog_reg) != 0) {
+       ret = ipt_register_target(&ipt_ulog_reg);
+       if (ret < 0) {
                sock_release(nflognl->sk_socket);
-               return -EINVAL;
+               return ret;
        }
        if (nflog)
                nf_log_register(PF_INET, &ipt_ulog_logger);
This page took 0.027371 seconds and 5 git commands to generate.