diff mbox

Subject: [PATCH] mount.cifs: remove redundant error assignment

Message ID 4C594E3E.2000903@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

Suresh Jayaraman Aug. 4, 2010, 11:25 a.m. UTC
None
diff mbox

Patch

diff --git a/mount.cifs.c b/mount.cifs.c
index 9f04261..3623e76 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -1554,16 +1554,16 @@  add_mtab(char *devname, char *mountpoint, unsigned long flags, const char *fstyp
 	mountent.mnt_freq = 0;
 	mountent.mnt_passno = 0;
 	rc = addmntent(pmntfile, &mountent);
+	if (rc) {
+		fprintf(stderr, "unable to add mount entry to mtab\n");
+		rc = EX_FILEIO;
+	}
 	endmntent(pmntfile);
 	unlock_mtab();
 	SAFE_FREE(mountent.mnt_opts);
 add_mtab_exit:
 	toggle_dac_capability(1, 0);
 	sigprocmask(SIG_SETMASK, &oldmask, NULL);
-	if (rc) {
-		fprintf(stderr, "unable to add mount entry to mtab\n");
-		rc = EX_FILEIO;
-	}
 
 	return rc;
 }