[PATCH] Error path accessed uninitialized variables (1 of 2)

[email protected] Mon, 8 Mar 2004 16:33:43 -0600
Newsgroups gmane.comp.file-systems.jfs.patches
Message-ID <[email protected]>
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/02/26 08:51:27-06:00 [email protected] 
#   JFS: Error path accessed uninitialized variables
# 
diff -Nru a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
--- a/fs/jfs/jfs_imap.c	Mon Mar  8 16:20:17 2004
+++ b/fs/jfs/jfs_imap.c	Mon Mar  8 16:20:17 2004
@@ -2055,7 +2055,7 @@
 static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino)
 {
 	int extno, bitno, agno, sword, rc;
-	struct metapage *amp, *bmp;
+	struct metapage *amp = NULL, *bmp = NULL;
 	struct iag *aiagp = 0, *biagp = 0;
 	u32 mask;
 
@@ -2065,8 +2065,6 @@
 	 * it on the list.
 	 */
 	if (iagp->nfreeinos == cpu_to_le32(1)) {
-		amp = bmp = NULL;
-
 		if ((int) le32_to_cpu(iagp->inofreefwd) >= 0) {
 			if ((rc =
 			     diIAGRead(imap, le32_to_cpu(iagp->inofreefwd),