]> err.no Git - linux-2.6/commitdiff
lockd: nlm_release_host() checks for NULL, caller needn't
authorJeff Layton <jlayton@redhat.com>
Tue, 15 Jul 2008 16:35:20 +0000 (12:35 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 15 Jul 2008 16:35:20 +0000 (12:35 -0400)
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>
fs/lockd/svc4proc.c
fs/lockd/svcproc.c

index 385437e3387de895fde1540f58c7d3269a842373..006a832d46f2f29edc3a239c765bac2fc8f33a4a 100644 (file)
@@ -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;
index 88379cc6e0b1c0ee196c8686c3f0e7c46cabef9a..fce3d7039625ddac158f5deb596056ad8a2d8004 100644 (file)
@@ -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;