浏览代码

btrfs: use PTR_ERR_OR_ZERO

replace IS_ERR/PTR_ERR

Cc: Chris Mason <clm@fb.com>
Cc: Josef Bacik <jbacik@fb.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Chris Mason <clm@fb.com>
Fabian Frederick 11 年之前
父节点
当前提交
6f84e23646
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      fs/btrfs/hash.c

+ 1 - 3
fs/btrfs/hash.c

@@ -20,10 +20,8 @@ static struct crypto_shash *tfm;
 int __init btrfs_hash_init(void)
 int __init btrfs_hash_init(void)
 {
 {
 	tfm = crypto_alloc_shash("crc32c", 0, 0);
 	tfm = crypto_alloc_shash("crc32c", 0, 0);
-	if (IS_ERR(tfm))
-		return PTR_ERR(tfm);
 
 
-	return 0;
+	return PTR_ERR_OR_ZERO(tfm);
 }
 }
 
 
 void btrfs_hash_exit(void)
 void btrfs_hash_exit(void)