From fe0bf1185ddf7e9d193cfe397ed1414d91526e19 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Tue, 18 Nov 2014 13:23:43 +0100 Subject: NFS: Deletion of unnecessary checks before the function call "nfs_put_client" The nfs_put_client() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Trond Myklebust --- fs/nfs/filelayout/filelayoutdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/nfs/filelayout/filelayoutdev.c') diff --git a/fs/nfs/filelayout/filelayoutdev.c b/fs/nfs/filelayout/filelayoutdev.c index 9bb806a76d9..bfecac781f1 100644 --- a/fs/nfs/filelayout/filelayoutdev.c +++ b/fs/nfs/filelayout/filelayoutdev.c @@ -204,8 +204,7 @@ destroy_ds(struct nfs4_pnfs_ds *ds) ifdebug(FACILITY) print_ds(ds); - if (ds->ds_clp) - nfs_put_client(ds->ds_clp); + nfs_put_client(ds->ds_clp); while (!list_empty(&ds->ds_addrs)) { da = list_first_entry(&ds->ds_addrs, -- cgit v1.2.3-70-g09d2