btrfs: remove redundant check on ret and goto
authorColin Ian King <colin.king@canonical.com>
Fri, 12 Jan 2018 16:52:58 +0000 (16:52 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:29 +0000 (15:09 +0200)
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 <colin.king@canonical.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tests/btrfs-tests.c

index 9786d8cd0aa638be63dd9ed149727949d01d6d1b..e74278170806ea5daa08ac7e5c951bd1db832443 100644 (file)
@@ -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;