summaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-11-28 21:29:49 +0100
committerLinus Torvalds <torvalds@woody.osdl.org>2006-11-29 02:26:50 +0100
commitde88777e6942de76410ad2eb2858f5fbb6eb9c35 (patch)
tree825106cd3660dd473920008669c07fa209b85d98 /fs/ecryptfs
parent[PATCH] fix create_write_pipe() error check (diff)
downloadlinux-de88777e6942de76410ad2eb2858f5fbb6eb9c35.tar.xz
linux-de88777e6942de76410ad2eb2858f5fbb6eb9c35.zip
[PATCH] ecryptfs: fix crypto_alloc_blkcipher() error check
The return value of crypto_alloc_blkcipher() should be checked by IS_ERR(). Cc: Mike Halcrow <mhalcrow@us.ibm.com> Cc: Phillip Hellewell <phillip@hellewell.homeip.net> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r--fs/ecryptfs/crypto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index 136175a69332..f63a7755fe86 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -820,7 +820,8 @@ int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat)
crypt_stat->tfm = crypto_alloc_blkcipher(full_alg_name, 0,
CRYPTO_ALG_ASYNC);
kfree(full_alg_name);
- if (!crypt_stat->tfm) {
+ if (IS_ERR(crypt_stat->tfm)) {
+ rc = PTR_ERR(crypt_stat->tfm);
ecryptfs_printk(KERN_ERR, "cryptfs: init_crypt_ctx(): "
"Error initializing cipher [%s]\n",
crypt_stat->cipher);