[PATCH] NFS: remove the redundant check when kfree an object in nfs_netns_client_release

From: zhong jiang
Date: Tue Sep 03 2019 - 02:08:02 EST


kfree has taken the null check in account. hence it is unnecessary to add the
null check before kfree the object. Just remove it.

Signed-off-by: zhong jiang <zhongjiang@xxxxxxxxxx>
---
fs/nfs/sysfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/nfs/sysfs.c b/fs/nfs/sysfs.c
index 4f3390b..c489496 100644
--- a/fs/nfs/sysfs.c
+++ b/fs/nfs/sysfs.c
@@ -121,8 +121,7 @@ static void nfs_netns_client_release(struct kobject *kobj)
struct nfs_netns_client,
kobject);

- if (c->identifier)
- kfree(c->identifier);
+ kfree(c->identifier);
kfree(c);
}

--
1.7.12.4