diff --git a/net/irda/irmod.c b/net/irda/irmod.c
index 1900937b332871b350e9ae539b417df8c3a1e446..8ba703da2797493be2e007fd23e9ca0a53fb1b11 100644
--- a/net/irda/irmod.c
+++ b/net/irda/irmod.c
@@ -128,8 +128,8 @@ static int __init irda_init(void)
  out_err_3:
 #ifdef CONFIG_SYSCTL
 	irda_sysctl_unregister();
-#endif
  out_err_2:
+#endif
 #ifdef CONFIG_PROC_FS
 	irda_proc_unregister();
 #endif