diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2013-02-12 15:03:42 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-02-17 15:27:21 -0500 |
commit | 96aa1549afa6c79ae4a4f099de861efd218c38d8 (patch) | |
tree | e53bf6d01561b69eca6e3b893a6fed999fb13e03 /fs/nfs/unlink.c | |
parent | 085b7a45c63d3da5be155faab9249a5cab224561 (diff) |
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/unlink.c')
-rw-r--r-- | fs/nfs/unlink.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index 13cea637eff8..d26a32f5b53b 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c | |||
@@ -268,8 +268,7 @@ nfs_async_unlink(struct inode *dir, struct dentry *dentry) | |||
268 | * point dentry is definitely not a root, so we won't need | 268 | * point dentry is definitely not a root, so we won't need |
269 | * that anymore. | 269 | * that anymore. |
270 | */ | 270 | */ |
271 | if (devname_garbage) | 271 | kfree(devname_garbage); |
272 | kfree(devname_garbage); | ||
273 | return 0; | 272 | return 0; |
274 | out_unlock: | 273 | out_unlock: |
275 | spin_unlock(&dentry->d_lock); | 274 | spin_unlock(&dentry->d_lock); |