Skip to content

Commit

Permalink
lockd: nlm_release_host() checks for NULL, caller needn't
Browse files Browse the repository at this point in the history
No need to check for a NULL argument twice.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
Jeff Layton authored and J. Bruce Fields committed Jul 15, 2008
1 parent afc1246 commit b0e92aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions fs/lockd/svc4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
return 0;

no_locks:
if (host)
nlm_release_host(host);
nlm_release_host(host);
if (error)
return error;
return nlm_lck_denied_nolocks;
Expand Down
3 changes: 1 addition & 2 deletions fs/lockd/svcproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
return 0;

no_locks:
if (host)
nlm_release_host(host);
nlm_release_host(host);
if (error)
return error;
return nlm_lck_denied_nolocks;
Expand Down

0 comments on commit b0e92aa

Please sign in to comment.