提交 89b6c8d1 编写于 作者: D Dan Carpenter 提交者: Chris Mason

Btrfs: tests: checking for NULL instead of IS_ERR()

btrfs_alloc_dummy_root() return an error pointer on failure, it never
returns NULL.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 9dcbeed4
......@@ -898,8 +898,10 @@ int btrfs_test_free_space_cache(void)
}
root = btrfs_alloc_dummy_root();
if (!root)
if (IS_ERR(root)) {
ret = PTR_ERR(root);
goto out;
}
root->fs_info = btrfs_alloc_dummy_fs_info();
if (!root->fs_info)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册