mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
SUNRPC: Fix the return value in gss_import_sec_context()
If the context allocation fails, it will return GSS_S_FAILURE, which is neither a valid error code, nor is it even negative. Return ENOMEM instead... Reported-by: Jeff Layton <[email protected]> Cc: [email protected] Signed-off-by: Trond Myklebust <[email protected]>
This commit is contained in:
parent
14ace024b1
commit
b891e4a05e
1 changed files with 1 additions and 1 deletions
|
|
@ -252,7 +252,7 @@ gss_import_sec_context(const void *input_token, size_t bufsize,
|
|||
struct gss_ctx **ctx_id)
|
||||
{
|
||||
if (!(*ctx_id = kzalloc(sizeof(**ctx_id), GFP_KERNEL)))
|
||||
return GSS_S_FAILURE;
|
||||
return -ENOMEM;
|
||||
(*ctx_id)->mech_type = gss_mech_get(mech);
|
||||
|
||||
return mech->gm_ops
|
||||
|
|
|
|||
Loading…
Reference in a new issue