error is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li kunyu <kunyu@xxxxxxxxxxxx> --- fs/ext4/extents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index f3cb570951a7e..254e07a33eb9b 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -4977,7 +4977,7 @@ static int ext4_fiemap_check_ranges(struct inode *inode, u64 start, u64 *len) int ext4_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, u64 start, u64 len) { - int error = 0; + int error; if (fieinfo->fi_flags & FIEMAP_FLAG_CACHE) { error = ext4_ext_precache(inode); @@ -5009,7 +5009,7 @@ int ext4_get_es_cache(struct inode *inode, struct fiemap_extent_info *fieinfo, { ext4_lblk_t start_blk, len_blks; __u64 last_blk; - int error = 0; + int error; if (ext4_has_inline_data(inode)) { int has_inline; -- 2.18.2