Skip to content

Commit

Permalink
xfs: fix simple_return.cocci warning in xfs_file_readdir
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kbuild test robot authored and Dave Chinner committed Nov 30, 2014
1 parent b72091f commit 8300475
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fs/xfs/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand All @@ -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
Expand Down

0 comments on commit 8300475

Please sign in to comment.