From: Carsten Otte Date: Wed, 19 Apr 2006 17:06:37 +0000 (-0400) Subject: NFS: remove needless check in nfs_opendir() X-Git-Tag: v2.6.17-rc3~80^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7451c4f0ee53e36fd74168af8df75b28fd04a2aa;p=linux-2.6 NFS: remove needless check in nfs_opendir() Local variable res was initialized to 0 - no check needed here. Signed-off-by: Carsten Otte Cc: Trond Myklebust Signed-off-by: Andrew Morton Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index a23f348941..cae74dd4c7 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -128,15 +128,14 @@ struct inode_operations nfs4_dir_inode_operations = { static int nfs_opendir(struct inode *inode, struct file *filp) { - int res = 0; + int res; dfprintk(VFS, "NFS: opendir(%s/%ld)\n", inode->i_sb->s_id, inode->i_ino); lock_kernel(); /* Call generic open code in order to cache credentials */ - if (!res) - res = nfs_open(inode, filp); + res = nfs_open(inode, filp); unlock_kernel(); return res; }