diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-01-04 07:47:03 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2019-02-06 21:37:14 +0100 |
commit | 1c3da4452d185e4be663e76a1b9842184d8f9c4c (patch) | |
tree | 1736f3e7f164c68fdf7d9cd01c2d6340da4994a6 /fs/nfsd/nfs4callback.c | |
parent | svcrdma: Remove max_sge check at connect time (diff) | |
download | linux-1c3da4452d185e4be663e76a1b9842184d8f9c4c.tar.xz linux-1c3da4452d185e4be663e76a1b9842184d8f9c4c.zip |
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: 97f68c6b02e0 ("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>
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index c74e4538d0eb..9b38dab1c21b 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -913,9 +913,9 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c return PTR_ERR(client); } cred = get_backchannel_cred(clp, client, ses); - if (IS_ERR(cred)) { + if (!cred) { rpc_shutdown_client(client); - return PTR_ERR(cred); + return -ENOMEM; } clp->cl_cb_client = client; clp->cl_cb_cred = cred; |