diff --git a/src/plugins/job_container/tmpfs/job_container_tmpfs.c b/src/plugins/job_container/tmpfs/job_container_tmpfs.c
index f18f14a62a0b50d5c9f9ecb1ef38f0db6a01bad6..2680413a661ae5d37dbad9889496ed4f6214c773 100644
--- a/src/plugins/job_container/tmpfs/job_container_tmpfs.c
+++ b/src/plugins/job_container/tmpfs/job_container_tmpfs.c
@@ -151,7 +151,7 @@ extern int init(void)
  */
 extern int fini(void)
 {
-	int rc = 0;
+	int rc = SLURM_SUCCESS;
 
 	debug("%s unloaded", plugin_name);
 
@@ -164,11 +164,10 @@ extern int fini(void)
 		error("%s: Configuration not loaded", __func__);
 		return SLURM_ERROR;
 	}
-	rc = umount2(jc_conf->basepath, MNT_DETACH);
-	if (rc) {
+	if (umount2(jc_conf->basepath, MNT_DETACH)) {
 		error("%s: umount2: %s failed: %s",
 		      __func__, jc_conf->basepath, strerror(errno));
-		return SLURM_ERROR;
+		rc = SLURM_ERROR;
 	}
 	free_jc_conf();
 
@@ -177,7 +176,7 @@ extern int fini(void)
 		step_ns_fd = -1;
 	}
 
-	return SLURM_SUCCESS;
+	return rc;
 }
 
 extern int container_p_restore(char *dir_name, bool recover)