浏览代码

btrfs: remove redundant check on ret and goto

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>
Colin Ian King 7 年之前
父节点
当前提交
7a61f88088
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      fs/btrfs/tests/btrfs-tests.c

+ 1 - 2
fs/btrfs/tests/btrfs-tests.c

@@ -278,8 +278,7 @@ int btrfs_run_sanity_tests(void)
 		}
 		}
 	}
 	}
 	ret = btrfs_test_extent_map();
 	ret = btrfs_test_extent_map();
-	if (ret)
-		goto out;
+
 out:
 out:
 	btrfs_destroy_test_fs();
 	btrfs_destroy_test_fs();
 	return ret;
 	return ret;