diff options
author | kbuild test robot <fengguang.wu@intel.com> | 2014-11-30 22:25:28 +0100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-11-30 22:25:28 +0100 |
commit | 8300475ebf03a54ec3c56b6b808ccbd9e1bc320d (patch) | |
tree | cf3cf8207847e0edfd3cec7771cbc460c6c6318e /fs/xfs/xfs_file.c | |
parent | libxfs: fix simple_return.cocci warnings (diff) | |
download | linux-8300475ebf03a54ec3c56b6b808ccbd9e1bc320d.tar.xz linux-8300475ebf03a54ec3c56b6b808ccbd9e1bc320d.zip |
xfs: fix simple_return.cocci warning in xfs_file_readdir
fs/xfs/xfs_file.c:919:1-6: WARNING: end returns can be simpified and declaration on line 902 can be dropped
Simplify a trivial if-return sequence. Possibly combine with a
preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r-- | fs/xfs/xfs_file.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index eb596b419942..5f467cf21c26 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -933,7 +933,6 @@ xfs_file_readdir( { struct inode *inode = file_inode(file); xfs_inode_t *ip = XFS_I(inode); - int error; size_t bufsize; /* @@ -950,10 +949,7 @@ xfs_file_readdir( */ bufsize = (size_t)min_t(loff_t, 32768, ip->i_d.di_size); - error = xfs_readdir(ip, ctx, bufsize); - if (error) - return error; - return 0; + return xfs_readdir(ip, ctx, bufsize); } STATIC int |