diff options
-rw-r--r-- | security/keys/process_keys.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c index 20e4bf57aec8..58dfe0890947 100644 --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c | |||
@@ -367,6 +367,8 @@ key_ref_t search_my_process_keyrings(struct key_type *type, | |||
367 | 367 | ||
368 | switch (PTR_ERR(key_ref)) { | 368 | switch (PTR_ERR(key_ref)) { |
369 | case -EAGAIN: /* no key */ | 369 | case -EAGAIN: /* no key */ |
370 | if (ret) | ||
371 | break; | ||
370 | case -ENOKEY: /* negative key */ | 372 | case -ENOKEY: /* negative key */ |
371 | ret = key_ref; | 373 | ret = key_ref; |
372 | break; | 374 | break; |