From 2bf877db8e28ea4511eff1b25eee60e0da5d0f7c Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 29 Oct 2019 09:40:18 +0100 Subject: fs: ext4: return NULL instead of 0 ext4fs_get_extent_block() returns a pointer, so return NULL instead of integer 0. Signed-off-by: Sascha Hauer --- fs/ext4/ext4_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs') diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c index 2703b55e99..c9f27f1278 100644 --- a/fs/ext4/ext4_common.c +++ b/fs/ext4/ext4_common.c @@ -52,7 +52,7 @@ static struct ext4_extent_header *ext4fs_get_extent_block(struct ext2_data *data index = (struct ext4_extent_idx *)(ext_block + 1); if (le16_to_cpu(ext_block->eh_magic) != EXT4_EXT_MAGIC) - return 0; + return NULL; if (ext_block->eh_depth == 0) return ext_block; @@ -64,7 +64,7 @@ static struct ext4_extent_header *ext4fs_get_extent_block(struct ext2_data *data } while (fileblock >= le32_to_cpu(index[i].ei_block)); if (--i < 0) - return 0; + return NULL; block = le16_to_cpu(index[i].ei_leaf_hi); block = (block << 32) + le32_to_cpu(index[i].ei_leaf_lo); -- cgit v1.2.3