summaryrefslogtreecommitdiff
path: root/security/keys/request_key.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-07-13 07:30:11 (GMT)
committerDave Airlie <airlied@redhat.com>2011-07-13 07:30:22 (GMT)
commitcf056edbbe70393faa6edd2b7859a14467910946 (patch)
treeca30ef021f12d1f06e18856a60f815ba63e78f60 /security/keys/request_key.c
parent58b6542b50ded4243c26c251c0507e5f658642f6 (diff)
parent620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc (diff)
downloadlinux-fsl-qoriq-cf056edbbe70393faa6edd2b7859a14467910946.tar.xz
Merge 3.0-rc7 into drm-core-next
This pulls in all the drm fixes up to this point which are needed for some -next patches to work.
Diffstat (limited to 'security/keys/request_key.c')
-rw-r--r--security/keys/request_key.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/keys/request_key.c b/security/keys/request_key.c
index 8e319a4..8246532 100644
--- a/security/keys/request_key.c
+++ b/security/keys/request_key.c
@@ -469,7 +469,7 @@ static struct key *construct_key_and_link(struct key_type *type,
} else if (ret == -EINPROGRESS) {
ret = 0;
} else {
- key = ERR_PTR(ret);
+ goto couldnt_alloc_key;
}
key_put(dest_keyring);
@@ -479,6 +479,7 @@ static struct key *construct_key_and_link(struct key_type *type,
construction_failed:
key_negate_and_link(key, key_negative_timeout, NULL, NULL);
key_put(key);
+couldnt_alloc_key:
key_put(dest_keyring);
kleave(" = %d", ret);
return ERR_PTR(ret);