Btrfs: return code checking

Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 2632152..97715ba 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -125,6 +125,11 @@
 	ins->flags = 0;
 	start_found = 0;
 	ret = search_slot(root, ins, &path, 0);
+	if (ret < 0) {
+		release_path(root, &path);
+		return ret;
+	}
+
 	while (1) {
 		l = &path.nodes[0]->leaf;
 		slot = path.slots[0];