Commit 3b334d42 authored by Eric Leblond's avatar Eric Leblond Committed by David S. Miller

netfilter: fix warning in ebt_ulog init function.

The ebt_ulog module does not follow the fixed convention about function
return. Loading the module is triggering the following message:

sys_init_module: 'ebt_ulog'->init suspiciously returned 1, it should follow 0/-E convention
sys_init_module: loading module anyway...
Pid: 2334, comm: modprobe Not tainted 2.6.29-rc5edenwall0-00883-g199e57b #146
Call Trace:
 [<c0441b81>] ? printk+0xf/0x16
 [<c02311af>] sys_init_module+0x107/0x186
 [<c0202cfa>] syscall_call+0x7/0xb

The following patch fixes the return treatment in ebt_ulog_init()
function.
Signed-off-by: default avatarEric Leblond <eric@inl.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 704b3ea3
...@@ -287,13 +287,13 @@ static struct nf_logger ebt_ulog_logger __read_mostly = { ...@@ -287,13 +287,13 @@ static struct nf_logger ebt_ulog_logger __read_mostly = {
static int __init ebt_ulog_init(void) static int __init ebt_ulog_init(void)
{ {
bool ret = true; int ret;
int i; int i;
if (nlbufsiz >= 128*1024) { if (nlbufsiz >= 128*1024) {
printk(KERN_NOTICE "ebt_ulog: Netlink buffer has to be <= 128kB," printk(KERN_NOTICE "ebt_ulog: Netlink buffer has to be <= 128kB,"
" please try a smaller nlbufsiz parameter.\n"); " please try a smaller nlbufsiz parameter.\n");
return false; return -EINVAL;
} }
/* initialize ulog_buffers */ /* initialize ulog_buffers */
...@@ -308,12 +308,12 @@ static int __init ebt_ulog_init(void) ...@@ -308,12 +308,12 @@ static int __init ebt_ulog_init(void)
if (!ebtulognl) { if (!ebtulognl) {
printk(KERN_WARNING KBUILD_MODNAME ": out of memory trying to " printk(KERN_WARNING KBUILD_MODNAME ": out of memory trying to "
"call netlink_kernel_create\n"); "call netlink_kernel_create\n");
ret = false; ret = -ENOMEM;
} else if (xt_register_target(&ebt_ulog_tg_reg) != 0) { } else if ((ret = xt_register_target(&ebt_ulog_tg_reg)) != 0) {
netlink_kernel_release(ebtulognl); netlink_kernel_release(ebtulognl);
} }
if (ret) if (ret == 0)
nf_log_register(NFPROTO_BRIDGE, &ebt_ulog_logger); nf_log_register(NFPROTO_BRIDGE, &ebt_ulog_logger);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment