summaryrefslogtreecommitdiffstats
path: root/fs/nfs/getroot.c
diff options
context:
space:
mode:
authorTim Gardner <tim.gardner@canonical.com>2013-02-12 21:03:42 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-02-17 21:27:21 +0100
commit96aa1549afa6c79ae4a4f099de861efd218c38d8 (patch)
treee53bf6d01561b69eca6e3b893a6fed999fb13e03 /fs/nfs/getroot.c
parentNFSv4.1: Don't decode skipped layoutgets (diff)
downloadlinux-96aa1549afa6c79ae4a4f099de861efd218c38d8.tar.xz
linux-96aa1549afa6c79ae4a4f099de861efd218c38d8.zip
nfs: remove kfree() redundant null checks
smatch analysis: fs/nfs/getroot.c:130 nfs_get_root() info: redundant null check on name calling kfree() fs/nfs/unlink.c:272 nfs_async_unlink() info: redundant null check on devname_garbage calling kfree() Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: linux-nfs@vger.kernel.org Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/getroot.c')
-rw-r--r--fs/nfs/getroot.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c
index 033803c36644..44efaa8c5f78 100644
--- a/fs/nfs/getroot.c
+++ b/fs/nfs/getroot.c
@@ -126,8 +126,7 @@ struct dentry *nfs_get_root(struct super_block *sb, struct nfs_fh *mntfh,
}
spin_unlock(&ret->d_lock);
out:
- if (name)
- kfree(name);
+ kfree(name);
nfs_free_fattr(fsinfo.fattr);
return ret;
}