Index: uspace/srv/fs/tmpfs/tmpfs_dump.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs_dump.c	(revision 0daba2122dbae0532b6060c324edd987cb367f6a)
+++ uspace/srv/fs/tmpfs/tmpfs_dump.c	(revision 54e4479f46415540ebc300de736a40054d783148)
@@ -82,6 +82,6 @@
 				return false;
 			
-			fn = ops->create(dev, L_FILE);
-			if (fn == NULL) {
+			rc = ops->create(&fn, dev, L_FILE);
+			if (rc != EOK || fn == NULL) {
 				free(fname);
 				return false;
@@ -90,5 +90,5 @@
 			if (block_seqread(dev, bufpos, buflen, pos, fname,
 			    entry.len) != EOK) {
-				ops->destroy(fn);
+				(void) ops->destroy(fn);
 				free(fname);
 				return false;
@@ -98,5 +98,5 @@
 			rc = ops->link(pfn, fn, fname);
 			if (rc != EOK) {
-				ops->destroy(fn);
+				(void) ops->destroy(fn);
 				free(fname);
 				return false;
@@ -126,6 +126,6 @@
 				return false;
 			
-			fn = ops->create(dev, L_DIRECTORY);
-			if (fn == NULL) {
+			rc = ops->create(&fn, dev, L_DIRECTORY);
+			if (rc != EOK || fn == NULL) {
 				free(fname);
 				return false;
@@ -134,5 +134,5 @@
 			if (block_seqread(dev, bufpos, buflen, pos, fname,
 			    entry.len) != EOK) {
-				ops->destroy(fn);
+				(void) ops->destroy(fn);
 				free(fname);
 				return false;
@@ -142,5 +142,5 @@
 			rc = ops->link(pfn, fn, fname);
 			if (rc != EOK) {
-				ops->destroy(fn);
+				(void) ops->destroy(fn);
 				free(fname);
 				return false;
@@ -164,4 +164,5 @@
 {
 	libfs_ops_t *ops = &tmpfs_libfs_ops;
+	fs_node_t *fn;
 	int rc;
 
@@ -182,6 +183,9 @@
 		goto error;
 	
-	if (!tmpfs_restore_recursion(dev, &bufpos, &buflen, &pos,
-	    ops->root_get(dev)))
+	rc = ops->root_get(&fn, dev);
+	if (rc != EOK)
+		goto error;
+
+	if (!tmpfs_restore_recursion(dev, &bufpos, &buflen, &pos, fn))
 		goto error;
 		
Index: uspace/srv/fs/tmpfs/tmpfs_ops.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision 0daba2122dbae0532b6060c324edd987cb367f6a)
+++ uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision 54e4479f46415540ebc300de736a40054d783148)
@@ -67,13 +67,24 @@
 
 /* Forward declarations of static functions. */
-static fs_node_t *tmpfs_match(fs_node_t *, const char *);
-static fs_node_t *tmpfs_node_get(dev_handle_t, fs_index_t);
-static void tmpfs_node_put(fs_node_t *);
-static fs_node_t *tmpfs_create_node(dev_handle_t, int);
+static int tmpfs_match(fs_node_t **, fs_node_t *, const char *);
+static int tmpfs_node_get(fs_node_t **, dev_handle_t, fs_index_t);
+static int tmpfs_node_put(fs_node_t *);
+static int tmpfs_create_node(fs_node_t **, dev_handle_t, int);
+static int tmpfs_destroy_node(fs_node_t *);
 static int tmpfs_link_node(fs_node_t *, fs_node_t *, const char *);
 static int tmpfs_unlink_node(fs_node_t *, fs_node_t *, const char *);
-static int tmpfs_destroy_node(fs_node_t *);
 
 /* Implementation of helper functions. */
+static int tmpfs_root_get(fs_node_t **rfn, dev_handle_t dev_handle)
+{
+	return tmpfs_node_get(rfn, dev_handle, TMPFS_SOME_ROOT); 
+}
+
+static int tmpfs_has_children(bool *has_children, fs_node_t *fn)
+{
+	*has_children = !list_empty(&TMPFS_NODE(fn)->cs_head);
+	return EOK;
+}
+
 static fs_index_t tmpfs_index_get(fs_node_t *fn)
 {
@@ -89,14 +100,4 @@
 {
 	return TMPFS_NODE(fn)->lnkcnt;
-}
-
-static bool tmpfs_has_children(fs_node_t *fn)
-{
-	return !list_empty(&TMPFS_NODE(fn)->cs_head);
-}
-
-static fs_node_t *tmpfs_root_get(dev_handle_t dev_handle)
-{
-	return tmpfs_node_get(dev_handle, TMPFS_SOME_ROOT); 
 }
 
@@ -118,4 +119,5 @@
 /** libfs operations */
 libfs_ops_t tmpfs_libfs_ops = {
+	.root_get = tmpfs_root_get,
 	.match = tmpfs_match,
 	.node_get = tmpfs_node_get,
@@ -125,9 +127,8 @@
 	.link = tmpfs_link_node,
 	.unlink = tmpfs_unlink_node,
+	.has_children = tmpfs_has_children,
 	.index_get = tmpfs_index_get,
 	.size_get = tmpfs_size_get,
 	.lnkcnt_get = tmpfs_lnkcnt_get,
-	.has_children = tmpfs_has_children,
-	.root_get = tmpfs_root_get,
 	.plb_get_char = tmpfs_plb_get_char,
 	.is_directory = tmpfs_is_directory,
@@ -197,7 +198,8 @@
 {
 	fs_node_t *rfn;
+	int rc;
 	
-	rfn = tmpfs_create_node(dev_handle, L_DIRECTORY);
-	if (!rfn) 
+	rc = tmpfs_create_node(&rfn, dev_handle, L_DIRECTORY);
+	if (rc != EOK || !rfn)
 		return false;
 	TMPFS_NODE(rfn)->lnkcnt = 0;	/* FS root is not linked */
@@ -205,5 +207,5 @@
 }
 
-fs_node_t *tmpfs_match(fs_node_t *pfn, const char *component)
+int tmpfs_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
 {
 	tmpfs_node_t *parentp = TMPFS_NODE(pfn);
@@ -212,14 +214,17 @@
 	for (lnk = parentp->cs_head.next; lnk != &parentp->cs_head;
 	    lnk = lnk->next) {
-		tmpfs_dentry_t *dentryp = list_get_instance(lnk, tmpfs_dentry_t,
-		    link);
-		if (!str_cmp(dentryp->name, component))
-			return FS_NODE(dentryp->node);
-	}
-
-	return NULL;
-}
-
-fs_node_t *tmpfs_node_get(dev_handle_t dev_handle, fs_index_t index)
+		tmpfs_dentry_t *dentryp;
+		dentryp = list_get_instance(lnk, tmpfs_dentry_t, link);
+		if (!str_cmp(dentryp->name, component)) {
+			*rfn = FS_NODE(dentryp->node);
+			return EOK;
+		}
+	}
+
+	*rfn = NULL;
+	return EOK;
+}
+
+int tmpfs_node_get(fs_node_t **rfn, dev_handle_t dev_handle, fs_index_t index)
 {
 	unsigned long key[] = {
@@ -228,30 +233,42 @@
 	};
 	link_t *lnk = hash_table_find(&nodes, key);
-	if (!lnk)
-		return NULL;
-	return FS_NODE(hash_table_get_instance(lnk, tmpfs_node_t, nh_link));
-}
-
-void tmpfs_node_put(fs_node_t *fn)
+	if (lnk) {
+		tmpfs_node_t *nodep;
+		nodep = hash_table_get_instance(lnk, tmpfs_node_t, nh_link);
+		*rfn = FS_NODE(nodep);
+	} else {
+		*rfn = NULL;
+	}
+	return EOK;	
+}
+
+int tmpfs_node_put(fs_node_t *fn)
 {
 	/* nothing to do */
-}
-
-fs_node_t *tmpfs_create_node(dev_handle_t dev_handle, int lflag)
-{
+	return EOK;
+}
+
+int tmpfs_create_node(fs_node_t **rfn, dev_handle_t dev_handle, int lflag)
+{
+	fs_node_t *rootfn;
+	int rc;
+
 	assert((lflag & L_FILE) ^ (lflag & L_DIRECTORY));
 
 	tmpfs_node_t *nodep = malloc(sizeof(tmpfs_node_t));
 	if (!nodep)
-		return NULL;
+		return ENOMEM;
 	tmpfs_node_initialize(nodep);
 	nodep->bp = malloc(sizeof(fs_node_t));
 	if (!nodep->bp) {
 		free(nodep);
-		return NULL;
+		return ENOMEM;
 	}
 	fs_node_initialize(nodep->bp);
 	nodep->bp->data = nodep;	/* link the FS and TMPFS nodes */
-	if (!tmpfs_root_get(dev_handle))
+
+	rc = tmpfs_root_get(&rootfn, dev_handle);
+	assert(rc == EOK);
+	if (!rootfn)
 		nodep->index = TMPFS_SOME_ROOT;
 	else
@@ -269,5 +286,26 @@
 	};
 	hash_table_insert(&nodes, key, &nodep->nh_link);
-	return FS_NODE(nodep);
+	*rfn = FS_NODE(nodep);
+	return EOK;
+}
+
+int tmpfs_destroy_node(fs_node_t *fn)
+{
+	tmpfs_node_t *nodep = TMPFS_NODE(fn);
+	
+	assert(!nodep->lnkcnt);
+	assert(list_empty(&nodep->cs_head));
+
+	unsigned long key[] = {
+		[NODES_KEY_INDEX] = nodep->index,
+		[NODES_KEY_DEV] = nodep->dev_handle
+	};
+	hash_table_remove(&nodes, key, 2);
+
+	if (nodep->type == TMPFS_FILE)
+		free(nodep->data);
+	free(nodep->bp);
+	free(nodep);
+	return EOK;
 }
 
@@ -343,27 +381,8 @@
 }
 
-int tmpfs_destroy_node(fs_node_t *fn)
-{
-	tmpfs_node_t *nodep = TMPFS_NODE(fn);
-	
-	assert(!nodep->lnkcnt);
-	assert(list_empty(&nodep->cs_head));
-
-	unsigned long key[] = {
-		[NODES_KEY_INDEX] = nodep->index,
-		[NODES_KEY_DEV] = nodep->dev_handle
-	};
-	hash_table_remove(&nodes, key, 2);
-
-	if (nodep->type == TMPFS_FILE)
-		free(nodep->data);
-	free(nodep->bp);
-	free(nodep);
-	return EOK;
-}
-
 void tmpfs_mounted(ipc_callid_t rid, ipc_call_t *request)
 {
 	dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
+	int rc;
 
 	/* accept the mount options */
@@ -395,5 +414,8 @@
 	}
 
-	tmpfs_node_t *rootp = TMPFS_NODE(tmpfs_root_get(dev_handle));
+	fs_node_t *rootfn;
+	rc = tmpfs_root_get(&rootfn, dev_handle);
+	assert(rc == EOK);
+	tmpfs_node_t *rootp = TMPFS_NODE(rootfn);
 	if (str_cmp(opts, "restore") == 0) {
 		if (tmpfs_restore(dev_handle))
