diff options
Diffstat (limited to 'net/sunrpc/auth.c')
-rw-r--r-- | net/sunrpc/auth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 9bcec9b927b9..505e2d4b3d62 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c | |||
@@ -66,10 +66,10 @@ rpcauth_create(rpc_authflavor_t pseudoflavor, struct rpc_clnt *clnt) | |||
66 | u32 flavor = pseudoflavor_to_flavor(pseudoflavor); | 66 | u32 flavor = pseudoflavor_to_flavor(pseudoflavor); |
67 | 67 | ||
68 | if (flavor >= RPC_AUTH_MAXFLAVOR || !(ops = auth_flavors[flavor])) | 68 | if (flavor >= RPC_AUTH_MAXFLAVOR || !(ops = auth_flavors[flavor])) |
69 | return NULL; | 69 | return ERR_PTR(-EINVAL); |
70 | auth = ops->create(clnt, pseudoflavor); | 70 | auth = ops->create(clnt, pseudoflavor); |
71 | if (!auth) | 71 | if (IS_ERR(auth)) |
72 | return NULL; | 72 | return auth; |
73 | if (clnt->cl_auth) | 73 | if (clnt->cl_auth) |
74 | rpcauth_destroy(clnt->cl_auth); | 74 | rpcauth_destroy(clnt->cl_auth); |
75 | clnt->cl_auth = auth; | 75 | clnt->cl_auth = auth; |