Index: uspace/srv/fs/minixfs/mfs_read.c
===================================================================
--- uspace/srv/fs/minixfs/mfs_read.c	(revision 6adba0a8c3feb4f6a1be23632a6e0e80442645c5)
+++ uspace/srv/fs/minixfs/mfs_read.c	(revision 8c76c30e96b5af1cbb6c6a087caa0fcfe8677777)
@@ -72,5 +72,5 @@
 {
 	block_t *bi1, *bi2;
-	int r, nr_direct, nr_indirect;
+	int r, nr_direct;
 	int ptrs_per_block;
 
@@ -88,12 +88,11 @@
 	if (fs_version == MFS_VERSION_V1) {
 		nr_direct = V1_NR_DIRECT_ZONES;
-		nr_indirect = V1_NR_INDIRECT_ZONES;
 		ptrs_per_block = MFS_BLOCKSIZE / sizeof(uint16_t);
 	} else {
 		nr_direct = V2_NR_DIRECT_ZONES;
-		nr_indirect = V2_NR_INDIRECT_ZONES;
 		ptrs_per_block = sbi->block_size / sizeof(uint32_t);
 	}
 
+	/*Check if the wanted block is in the direct zones*/
 	if (rblock < nr_direct) {
 		*b = ino_i->i_dzone[rblock];
@@ -103,6 +102,6 @@
 	rblock -= nr_direct - 1;
 
-	/*Check if the wanted block is in the single indirect zone*/
 	if (rblock < ptrs_per_block) {
+		/*The wanted block is in the single indirect zone chain*/
 		if (ino_i->i_izone[0] == 0) {
 			r = -1;
@@ -123,13 +122,11 @@
 	rblock -= ptrs_per_block - 1;
 
-	/*The wanted block is in the double indirect zone*/
-	uint32_t di_block = rblock / ptrs_per_block;
+	/*The wanted block is in the double indirect zone chain*/
 
-	/*read the first indirect zone*/
+	/*read the first indirect zone of the chain*/
 	if (ino_i->i_izone[1] == 0) {
 		r = -1;
 		goto out;
 	}
-
 	r = read_ind_block(bi1, mnode->instance, ino_i->i_izone[1]);
 
@@ -137,5 +134,11 @@
 		goto out;
 
-	/*read the second indirect zone*/
+	/*
+	 *Compute the position of the second indirect
+	 *zone pointer in the chain.
+	 */
+	uint32_t di_block = rblock / ptrs_per_block;
+
+	/*read the second indirect zone of the chain*/
 	if (fs_version == MFS_VERSION_V1) {
 		r = read_ind_block(bi2, mnode->instance,
@@ -155,4 +158,5 @@
 		*b = ((uint32_t *) bi2->data)[rblock % ptrs_per_block];
 	}
+	r = EOK;
 	block_put(bi2);
 
