diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-04-05 09:12:41 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-04-05 09:12:41 +0200 |
commit | 09f68072b32089f2e3b4749161eb3ce954faf8d4 (patch) | |
tree | b8b3c84f8a9c7150c2d830428daa3d641917ecf3 /fs/btrfs/root-tree.c | |
parent | d454f39f3ff3ee5a818c271026081a48a537bd41 (diff) | |
parent | ef49e4fae3f364af8da041dcc1bb4931c749b3da (diff) |
Merge branch 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc
Diffstat (limited to 'fs/btrfs/root-tree.c')
-rw-r--r-- | fs/btrfs/root-tree.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index 6a1086e83ffc..29b2d7c930eb 100644 --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c @@ -88,7 +88,8 @@ int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, search_key.offset = (u64)-1; path = btrfs_alloc_path(); - BUG_ON(!path); + if (!path) + return -ENOMEM; ret = btrfs_search_slot(NULL, root, &search_key, path, 0, 0); if (ret < 0) goto out; @@ -332,7 +333,8 @@ int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *leaf; path = btrfs_alloc_path(); - BUG_ON(!path); + if (!path) + return -ENOMEM; ret = btrfs_search_slot(trans, root, key, path, -1, 1); if (ret < 0) goto out; |