summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2021-05-15 20:09:41 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2021-05-26 16:00:35 +0200
commit4f55dc2a988b304d3595887f1161151d1c3b1f33 (patch)
tree467887f973b525c913b85f6bd986bbb5a6306c82 /fs/f2fs
parentf2fs: compress: clean up parameter of __f2fs_cluster_blocks() (diff)
downloadlinux-4f55dc2a988b304d3595887f1161151d1c3b1f33.tar.xz
linux-4f55dc2a988b304d3595887f1161151d1c3b1f33.zip
f2fs: return success if there is no work to do
Static analysis reports this problem file.c:3206:2: warning: Undefined or garbage value returned to caller return err; ^~~~~~~~~~ err is only set if there is some work to do. Because the loop returns immediately on an error, if all the work was done, a 0 would be returned. Instead of checking the unlikely case that there was no work to do, change the return of err to 0. Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 895dfcf45fe1..a6be76289452 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3202,7 +3202,7 @@ int f2fs_precache_extents(struct inode *inode)
map.m_lblk = m_next_extent;
}
- return err;
+ return 0;
}
static int f2fs_ioc_precache_extents(struct file *filp, unsigned long arg)