Index: uspace/srv/fs/fat/fat_fat.c
===================================================================
--- uspace/srv/fs/fat/fat_fat.c	(revision e402382f203ec32bb859c547174ce438b44e0f74)
+++ uspace/srv/fs/fat/fat_fat.c	(revision dc87ad11ff256254adc0520ebc4226b1b715a918)
@@ -234,14 +234,16 @@
  * @param dev_handle	Device handle for the file system.
  * @param clst		Cluster which to get.
- *
- * @return		Value found in the cluster.
- */
-fat_cluster_t
-fat_get_cluster(fat_bs_t *bs, dev_handle_t dev_handle, fat_cluster_t clst)
+ * @param value		Output argument holding the value of the cluster.
+ *
+ * @return		EOK or a negative error code.
+ */
+int
+fat_get_cluster(fat_bs_t *bs, dev_handle_t dev_handle, fat_cluster_t clst,
+    fat_cluster_t *value)
 {
 	block_t *b;
 	uint16_t bps;
 	uint16_t rscnt;
-	fat_cluster_t *cp, value;
+	fat_cluster_t *cp;
 	int rc;
 
@@ -251,11 +253,11 @@
 	rc = block_get(&b, dev_handle, rscnt +
 	    (clst * sizeof(fat_cluster_t)) / bps, BLOCK_FLAGS_NONE);
-	assert(rc == EOK);
+	if (rc != EOK)
+		return rc;
 	cp = (fat_cluster_t *)b->data + clst % (bps / sizeof(fat_cluster_t));
-	value = uint16_t_le2host(*cp);
+	*value = uint16_t_le2host(*cp);
 	rc = block_put(b);
-	assert(rc == EOK);
-	
-	return value;
+	
+	return rc;
 }
 
@@ -415,9 +417,11 @@
 	unsigned fatno;
 	fat_cluster_t nextc;
+	int rc;
 
 	/* Mark all clusters in the chain as free in all copies of FAT. */
 	while (firstc < FAT_CLST_LAST1) {
 		assert(firstc >= FAT_CLST_FIRST && firstc < FAT_CLST_BAD);
-		nextc = fat_get_cluster(bs, dev_handle, firstc);
+		rc = fat_get_cluster(bs, dev_handle, firstc, &nextc);
+		assert(rc == EOK);
 		for (fatno = FAT1; fatno < bs->fatcnt; fatno++)
 			fat_set_cluster(bs, dev_handle, fatno, firstc,
@@ -466,4 +470,6 @@
 void fat_chop_clusters(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t lastc)
 {
+	int rc;
+
 	dev_handle_t dev_handle = nodep->idx->dev_handle;
 	if (lastc == FAT_CLST_RES0) {
@@ -476,5 +482,6 @@
 		unsigned fatno;
 
-		nextc = fat_get_cluster(bs, dev_handle, lastc);
+		rc = fat_get_cluster(bs, dev_handle, lastc, &nextc);
+		assert(rc == EOK);
 
 		/* Terminate the cluster chain in all copies of FAT. */
Index: uspace/srv/fs/fat/fat_fat.h
===================================================================
--- uspace/srv/fs/fat/fat_fat.h	(revision e402382f203ec32bb859c547174ce438b44e0f74)
+++ uspace/srv/fs/fat/fat_fat.h	(revision dc87ad11ff256254adc0520ebc4226b1b715a918)
@@ -80,5 +80,6 @@
 extern void fat_alloc_shadow_clusters(struct fat_bs *, dev_handle_t,
     fat_cluster_t *, unsigned);
-extern fat_cluster_t fat_get_cluster(struct fat_bs *, dev_handle_t, fat_cluster_t);
+extern int fat_get_cluster(struct fat_bs *, dev_handle_t, fat_cluster_t,
+    fat_cluster_t *);
 extern void fat_set_cluster(struct fat_bs *, dev_handle_t, unsigned,
     fat_cluster_t, fat_cluster_t);
