projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9dcbeed
)
Btrfs: tests: checking for NULL instead of IS_ERR()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Tue, 10 Nov 2015 09:10:03 +0000
(12:10 +0300)
committer
Chris Mason
<clm@fb.com>
Wed, 25 Nov 2015 13:19:50 +0000
(
05:19
-0800)
btrfs_alloc_dummy_root() return an error pointer on failure, it never
returns NULL.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/tests/free-space-tests.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/tests/free-space-tests.c
b/fs/btrfs/tests/free-space-tests.c
index c8c3d70c31ffad4e02acd04e0f7dcaa54ad0fe2b..8b72b005bfb9a212518a711a2e476c2d70b47b24 100644
(file)
--- a/
fs/btrfs/tests/free-space-tests.c
+++ b/
fs/btrfs/tests/free-space-tests.c
@@
-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)