diff options
author | J. Bruce Fields <bfields@redhat.com> | 2010-07-21 18:31:42 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2010-07-23 08:51:27 -0400 |
commit | af4718f3f996925f770e540004ec9224243d1682 (patch) | |
tree | 38f81e3257cb9732ac09df98604bd77a5a42bc7b /fs/nfsd/nfssvc.c | |
parent | 59db4a0c102e0de226a3395dbf25ea51bf845937 (diff) |
nfsd: minor nfsd_svc() cleanup
More idiomatic to put the error case in the if clause.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r-- | fs/nfsd/nfssvc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 62a6c4474d13..92173bde32d2 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -443,12 +443,13 @@ nfsd_svc(unsigned short port, int nrservs) if (error) goto out_shutdown; error = svc_set_num_threads(nfsd_serv, NULL, nrservs); - if (error == 0) - /* We are holding a reference to nfsd_serv which - * we don't want to count in the return value, - * so subtract 1 - */ - error = nfsd_serv->sv_nrthreads - 1; + if (error) + goto out_destroy; + /* We are holding a reference to nfsd_serv which + * we don't want to count in the return value, + * so subtract 1 + */ + error = nfsd_serv->sv_nrthreads - 1; out_destroy: svc_destroy(nfsd_serv); /* Release server */ out_shutdown: |