Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[sfrench/cifs-2.6.git] / 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 */