nfsd: fix an IS_ERR() vs NULL check
The get_backchannel_cred() used to return error pointers on error but
now it returns NULL pointers.
Fixes: 97f68c6b02
("SUNRPC: add 'struct cred *' to auth_cred and rpc_cre")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
e248aa7be8
commit
1c3da4452d
|
@ -913,9 +913,9 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c
|
||||||
return PTR_ERR(client);
|
return PTR_ERR(client);
|
||||||
}
|
}
|
||||||
cred = get_backchannel_cred(clp, client, ses);
|
cred = get_backchannel_cred(clp, client, ses);
|
||||||
if (IS_ERR(cred)) {
|
if (!cred) {
|
||||||
rpc_shutdown_client(client);
|
rpc_shutdown_client(client);
|
||||||
return PTR_ERR(cred);
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
clp->cl_cb_client = client;
|
clp->cl_cb_client = client;
|
||||||
clp->cl_cb_cred = cred;
|
clp->cl_cb_cred = cred;
|
||||||
|
|
Loading…
Reference in New Issue