Skip to contentSkip to conversation

rfkill: hide unused goto label

PATCH Applied Arnd Bergmann 2 participants 2 messages Dec 16, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rfkill: hide unused goto label

A cleanup introduced a harmless warning in some configurations:

net/rfkill/core.c: In function 'rfkill_init':
net/rfkill/core.c:1350:1: warning: label 'error_input' defined but not used [-Wunused-label]

This adds another #ifdef around the label to match that around the caller.

Fixes 6124c53edeea ("rfkill: Cleanup error handling in rfkill_init()")
---
 net/rfkill/core.c | 2 ++
 1 file changed, 2 insertions(+)
net/rfkill/core.c +2 -0
index f6b01f3616e5..b7adaee69756 100644
@@ -1347,8 +1347,10 @@ static int __init rfkill_init(void)
 
 	return 0;
 
+#ifdef CONFIG_RFKILL_INPUT
 error_input:
 	rfkill_any_led_trigger_unregister();
+#endif
 error_led_trigger:
 	misc_deregister(&rfkill_miscdev);
 error_misc:
Signature · 1 line
2.9.0
maintainer Applied
#1 lore raw
Quoted 8 lines · Arnd Bergmann

A cleanup introduced a harmless warning in some configurations:

net/rfkill/core.c: In function 'rfkill_init':
net/rfkill/core.c:1350:1: warning: label 'error_input' defined but not used [-Wunused-label]

This adds another #ifdef around the label to match that around the caller.

Applied, thanks.

johannes