diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-18 07:23:43 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-11-24 20:07:27 -0500 |
commit | fe0bf1185ddf7e9d193cfe397ed1414d91526e19 (patch) | |
tree | f8b2c40b78cfa1714e606e79ffc36363ece0dc8f /fs/nfs/filelayout/filelayoutdev.c | |
parent | 1306729b0d4f4a0bd0d098711ed3d938dc5a1a28 (diff) |
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 <elfring@users.sourceforge.net>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/filelayout/filelayoutdev.c')
-rw-r--r-- | fs/nfs/filelayout/filelayoutdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/filelayout/filelayoutdev.c b/fs/nfs/filelayout/filelayoutdev.c index 9bb806a76d99..bfecac781f19 100644 --- a/fs/nfs/filelayout/filelayoutdev.c +++ b/fs/nfs/filelayout/filelayoutdev.c | |||
@@ -204,8 +204,7 @@ destroy_ds(struct nfs4_pnfs_ds *ds) | |||
204 | ifdebug(FACILITY) | 204 | ifdebug(FACILITY) |
205 | print_ds(ds); | 205 | print_ds(ds); |
206 | 206 | ||
207 | if (ds->ds_clp) | 207 | nfs_put_client(ds->ds_clp); |
208 | nfs_put_client(ds->ds_clp); | ||
209 | 208 | ||
210 | while (!list_empty(&ds->ds_addrs)) { | 209 | while (!list_empty(&ds->ds_addrs)) { |
211 | da = list_first_entry(&ds->ds_addrs, | 210 | da = list_first_entry(&ds->ds_addrs, |