bridge: netfilter: Move sysctl-specific error code inside #ifdef
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 12 Feb 2015 14:17:27 +0000 (15:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Feb 2015 16:44:46 +0000 (08:44 -0800)
If CONFIG_SYSCTL=n:

    net/bridge/br_netfilter.c: In function ‘br_netfilter_init’:
    net/bridge/br_netfilter.c:996: warning: label ‘err1’ defined but not used

Move the label and the code after it inside the existing #ifdef to get
rid of the warning.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netfilter.c

index 65728e0dc4ffd011fe87440510b76d34aa1b6ecb..0ee453fad3de652142ddce3b6af6f1c3bb52e95a 100644 (file)
@@ -987,15 +987,12 @@ static int __init br_netfilter_init(void)
        if (brnf_sysctl_header == NULL) {
                printk(KERN_WARNING
                       "br_netfilter: can't register to sysctl.\n");
-               ret = -ENOMEM;
-               goto err1;
+               nf_unregister_hooks(br_nf_ops, ARRAY_SIZE(br_nf_ops));
+               return -ENOMEM;
        }
 #endif
        printk(KERN_NOTICE "Bridge firewalling registered\n");
        return 0;
-err1:
-       nf_unregister_hooks(br_nf_ops, ARRAY_SIZE(br_nf_ops));
-       return ret;
 }
 
 static void __exit br_netfilter_fini(void)