OSDN Git Service

fs: nfs: sysfs: Remove NULL check before kfree
authorSaurav Girepunje <saurav.girepunje@gmail.com>
Tue, 29 Oct 2019 09:25:22 +0000 (14:55 +0530)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 18 Nov 2019 09:38:04 +0000 (10:38 +0100)
Remove NULL check before kfree, NULL check is taken care
on kfree.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/sysfs.c

index 4f3390b..c489496 100644 (file)
@@ -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);
 }