]> Pileus Git - ~andy/linux/blobdiff - security/keys/request_key.c
[NETNS][IPV6] rt6_info - move rt6_info structure inside the namespace
[~andy/linux] / security / keys / request_key.c
index 6381e616c47744904b6efe0f412b0039289bec7d..5ecc5057fb542c1bb9f914e72f4b95695d05dd70 100644 (file)
@@ -389,7 +389,7 @@ struct key *request_key_and_link(struct key_type *type,
        if (!IS_ERR(key_ref)) {
                key = key_ref_to_ptr(key_ref);
        } else if (PTR_ERR(key_ref) != -EAGAIN) {
-               key = ERR_PTR(PTR_ERR(key_ref));
+               key = ERR_CAST(key_ref);
        } else  {
                /* the search failed, but the keyrings were searchable, so we
                 * should consult userspace if we can */