From: kbuild test robot <lkp(a)intel.com>
fs/incfs/integrity.c:138:9-16: WARNING: ERR_CAST can be used with hash_alg
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
Generated by: scripts/coccinelle/api/err_cast.cocci
Fixes: 040942fc50b2 ("ANDROID: Initial commit of Incremental FS")
CC: Eugene Zemtsov <ezemtsov(a)google.com>
Signed-off-by: kbuild test robot <lkp(a)intel.com>
---
tree:
https://android.googlesource.com/kernel/common android-4.19
head: 7bab03039e64ed6c26be90530e08978eab3be578
commit: 040942fc50b20325bb56737c32b303268bb6f35c [1/4] ANDROID: Initial commit of
Incremental FS
integrity.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/incfs/integrity.c
+++ b/fs/incfs/integrity.c
@@ -135,7 +135,7 @@ struct mtree *incfs_alloc_mtree(enum inc
hash_alg = incfs_get_hash_alg(id);
if (IS_ERR(hash_alg))
- return ERR_PTR(PTR_ERR(hash_alg));
+ return ERR_CAST(hash_alg);
if (root_hash.len < hash_alg->digest_size)
return ERR_PTR(-EINVAL);