From: Carsten Otte Date: Wed, 19 Apr 2006 17:06:37 +0000 (-0400) Subject: NFS: remove needless check in nfs_opendir() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7451c4f0ee53e36fd74168af8df75b28fd04a2aa;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 a23f34894167..cae74dd4c7f5 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; }