btrfs: remove redundant check on ret and goto
Subsystems (2)
PATCH 1/1 btrfs: remove redundant check on ret and goto
From: Colin Ian King <[email protected]>
The check for a non-zero ret is redundant as the goto will jump to the very next statement anyway. Remove this extraneous code.
Detected by CoverityScan, CID#1463784 ("Identical code for different branches")
Signed-off-by Colin Ian King <[email protected]>
--- fs/btrfs/tests/btrfs-tests.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/btrfs/tests/btrfs-tests.c +1 -2
@@ -278,8 +278,7 @@ int btrfs_run_sanity_tests(void) } } ret =btrfs_test_extent_map (); -if (ret) - goto out; + out:btrfs_destroy_test_fs ();return ret;
Signature · 1 line
2.15.1
Quoted 9 lines · Colin King
From: Colin Ian King <[email protected]>
The check for a non-zero ret is redundant as the goto will jump to the very next statement anyway. Remove this extraneous code.
Detected by CoverityScan, CID#1463784 ("Identical code for different branches")
Signed-off-by Colin Ian King <[email protected]>
Added to next, thanks.