Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.

Change generated with coccinelle.

To: Gao Xiang <[email protected]>
To: Chao Yu <[email protected]>
To: Yue Hu <[email protected]>
To: Jeffle Xu <[email protected]>
To: Sandeep Dhavale <[email protected]>
To: Hongbo Li <[email protected]>
To: Chunhai Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Philipp Hahn <[email protected]>
---
 fs/erofs/zdata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 
3977e42b9516861bf3d59c072b6b8aaa6898dd8a..88c293ab2b1ef7962c6f5c0aa82639859e41b8e2
 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -1227,7 +1227,7 @@ static int z_erofs_parse_in_bvecs(struct z_erofs_backend 
*be, bool *overlapped)
                struct page *page = bvec->page;
 
                /* compressed data ought to be valid when decompressing */
-               if (IS_ERR(page) || !page) {
+               if (IS_ERR_OR_NULL(page)) {
                        bvec->page = NULL;      /* clear the failure reason */
                        err = page ? PTR_ERR(page) : -EIO;
                        continue;

-- 
2.43.0


Reply via email to