Messages in this thread Patch in this message | | | From | zhong jiang <> | Subject | [PATCH] NFS: remove the redundant check when kfree an object in nfs_netns_client_release | Date | Tue, 3 Sep 2019 14:04:48 +0800 |
| |
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@huawei.com> --- 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
| |