提交 b0e92aae 编写于 作者: J Jeff Layton 提交者: J. Bruce Fields

lockd: nlm_release_host() checks for NULL, caller needn't

No need to check for a NULL argument twice.
Signed-off-by: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
上级 afc1246f
...@@ -58,8 +58,7 @@ nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, ...@@ -58,8 +58,7 @@ nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
return 0; return 0;
no_locks: no_locks:
if (host) nlm_release_host(host);
nlm_release_host(host);
if (error) if (error)
return error; return error;
return nlm_lck_denied_nolocks; return nlm_lck_denied_nolocks;
......
...@@ -87,8 +87,7 @@ nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, ...@@ -87,8 +87,7 @@ nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
return 0; return 0;
no_locks: no_locks:
if (host) nlm_release_host(host);
nlm_release_host(host);
if (error) if (error)
return error; return error;
return nlm_lck_denied_nolocks; return nlm_lck_denied_nolocks;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册