diff --git a/res/res_corosync.c b/res/res_corosync.c
index e2b0596d1e5d2a2d8b98bc01f818c6348b4c87fc..72da3f129d951aacac0f598121ab57b10bd29c6e 100644
--- a/res/res_corosync.c
+++ b/res/res_corosync.c
@@ -863,7 +863,6 @@ static void cleanup_module(void)
 static int load_module(void)
 {
 	cs_error_t cs_err;
-	enum ast_module_load_result res = AST_MODULE_LOAD_FAILURE;
 	struct cpg_name name;
 
 	corosync_aggregate_topic = stasis_topic_create("corosync_aggregate_topic");
@@ -885,7 +884,6 @@ static int load_module(void)
 
 	if (load_config(0)) {
 		/* simply not configured is not a fatal error */
-		res = AST_MODULE_LOAD_DECLINE;
 		goto failed;
 	}
 
@@ -926,7 +924,7 @@ static int load_module(void)
 failed:
 	cleanup_module();
 
-	return res;
+	return AST_MODULE_LOAD_DECLINE;
 }
 
 static int unload_module(void)