* [PATCH] bridge: netfilter: Move sysctl-specific error code inside #ifdef
@ 2015-02-12 14:17 Geert Uytterhoeven
2015-02-12 16:45 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2015-02-12 14:17 UTC (permalink / raw)
To: Stephen Hemminger, David S. Miller
Cc: bridge, netdev, linux-kernel, Geert Uytterhoeven
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>
---
net/bridge/br_netfilter.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 65728e0dc4ffd011..0ee453fad3de6521 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -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)
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] bridge: netfilter: Move sysctl-specific error code inside #ifdef
2015-02-12 14:17 [PATCH] bridge: netfilter: Move sysctl-specific error code inside #ifdef Geert Uytterhoeven
@ 2015-02-12 16:45 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-02-12 16:45 UTC (permalink / raw)
To: geert; +Cc: stephen, bridge, netdev, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: Text/Plain; charset=iso-8859-7, Size: 596 bytes --]
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Thu, 12 Feb 2015 15:17:27 +0100
> 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>
Applied, thanks.
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-12 16:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-12 14:17 [PATCH] bridge: netfilter: Move sysctl-specific error code inside #ifdef Geert Uytterhoeven
2015-02-12 16:45 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®