diff --git a/net/rxrpc/main.c b/net/rxrpc/main.c
index 36fdcbcd80d1fe0e9bf62c13a9ecf68cc0299b4a..48cbd065bb45ab8ba5d676f802ebbcdf2ecc0d28 100644
--- a/net/rxrpc/main.c
+++ b/net/rxrpc/main.c
@@ -79,8 +79,8 @@ static int __init rxrpc_initialise(void)
  error_sysctl:
 #ifdef CONFIG_SYSCTL
 	rxrpc_sysctl_cleanup();
-#endif
  error_proc:
+#endif
 #ifdef CONFIG_PROC_FS
 	rxrpc_proc_cleanup();
 #endif