KEYS: Revert one application of "Fix unreachable code" patch
[~shefty/rdma-dev.git] / security / keys / process_keys.c
index 20e4bf57aec8b6418bf4d4df86c616903121c28c..58dfe089094793030f56fdb895f6621e403e4157 100644 (file)
@@ -367,6 +367,8 @@ key_ref_t search_my_process_keyrings(struct key_type *type,
 
                switch (PTR_ERR(key_ref)) {
                case -EAGAIN: /* no key */
+                       if (ret)
+                               break;
                case -ENOKEY: /* negative key */
                        ret = key_ref;
                        break;