include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / net / bridge / netfilter / ebt_ulog.c
index 80c78c5..f9560f3 100644 (file)
@@ -29,6 +29,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/socket.h>
 #include <linux/skbuff.h>
@@ -266,7 +267,7 @@ static bool ebt_ulog_tg_check(const struct xt_tgchk_param *par)
        if (uloginfo->qthreshold > EBT_ULOG_MAX_QLEN)
                uloginfo->qthreshold = EBT_ULOG_MAX_QLEN;
 
-       return 0;
+       return true;
 }
 
 static struct xt_target ebt_ulog_tg_reg __read_mostly = {
@@ -275,25 +276,25 @@ static struct xt_target ebt_ulog_tg_reg __read_mostly = {
        .family         = NFPROTO_BRIDGE,
        .target         = ebt_ulog_tg,
        .checkentry     = ebt_ulog_tg_check,
-       .targetsize     = XT_ALIGN(sizeof(struct ebt_ulog_info)),
+       .targetsize     = sizeof(struct ebt_ulog_info),
        .me             = THIS_MODULE,
 };
 
 static struct nf_logger ebt_ulog_logger __read_mostly = {
-       .name           = "ulog",
+       .name           = "ebt_ulog",
        .logfn          = &ebt_log_packet,
        .me             = THIS_MODULE,
 };
 
 static int __init ebt_ulog_init(void)
 {
-       bool ret = true;
+       int ret;
        int i;
 
        if (nlbufsiz >= 128*1024) {
                printk(KERN_NOTICE "ebt_ulog: Netlink buffer has to be <= 128kB,"
                       " please try a smaller nlbufsiz parameter.\n");
-               return false;
+               return -EINVAL;
        }
 
        /* initialize ulog_buffers */
@@ -308,12 +309,12 @@ static int __init ebt_ulog_init(void)
        if (!ebtulognl) {
                printk(KERN_WARNING KBUILD_MODNAME ": out of memory trying to "
                       "call netlink_kernel_create\n");
-               ret = false;
-       } else if (xt_register_target(&ebt_ulog_tg_reg) != 0) {
+               ret = -ENOMEM;
+       } else if ((ret = xt_register_target(&ebt_ulog_tg_reg)) != 0) {
                netlink_kernel_release(ebtulognl);
        }
 
-       if (ret)
+       if (ret == 0)
                nf_log_register(NFPROTO_BRIDGE, &ebt_ulog_logger);
 
        return ret;