diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-10-29 23:23:02 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2013-10-30 08:54:29 -0400 |
commit | d2b86970245b64652c4d7799e707dd8bd1533b64 (patch) | |
tree | 00aaa63cb66c5cfbd595261ba7f5029fbe1326f9 /security/keys | |
parent | 034faeb9ef390d58239e1dce748143f6b35a0d9b (diff) |
KEYS: fix error return code in big_key_instantiate()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'security/keys')
-rw-r--r-- | security/keys/big_key.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/security/keys/big_key.c b/security/keys/big_key.c index 5f9defc4a807..2cf5e62d67af 100644 --- a/security/keys/big_key.c +++ b/security/keys/big_key.c | |||
@@ -71,8 +71,10 @@ int big_key_instantiate(struct key *key, struct key_preparsed_payload *prep) | |||
71 | * TODO: Encrypt the stored data with a temporary key. | 71 | * TODO: Encrypt the stored data with a temporary key. |
72 | */ | 72 | */ |
73 | file = shmem_file_setup("", datalen, 0); | 73 | file = shmem_file_setup("", datalen, 0); |
74 | if (IS_ERR(file)) | 74 | if (IS_ERR(file)) { |
75 | ret = PTR_ERR(file); | ||
75 | goto err_quota; | 76 | goto err_quota; |
77 | } | ||
76 | 78 | ||
77 | written = kernel_write(file, prep->data, prep->datalen, 0); | 79 | written = kernel_write(file, prep->data, prep->datalen, 0); |
78 | if (written != datalen) { | 80 | if (written != datalen) { |