summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-10-29 09:40:18 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-29 10:08:15 +0100
commit2bf877db8e28ea4511eff1b25eee60e0da5d0f7c (patch)
tree6a54cb52d15481f304d0edfdbf94b1515442e6e6 /fs
parentc3912f75ff2909eadb5c919274139f9fa6cdfe36 (diff)
downloadbarebox-2bf877db8e28ea4511eff1b25eee60e0da5d0f7c.tar.gz
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/ext4_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index 2703b55..c9f27f1 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);