]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ecryptfs/crypto.c
ocfs2: pass ocfs2_super * into ocfs2_commit_trans()
[linux-2.6-omap-h63xx.git] / fs / ecryptfs / crypto.c
index f49f105394b70a91268a7ed63d56544aeff10fba..f63a7755fe8697ea7469182b1baa487fd1b48c7a 100644 (file)
@@ -134,7 +134,7 @@ int ecryptfs_crypto_api_algify_cipher_name(char **algified_name,
 
        algified_name_len = (chaining_modifier_len + cipher_name_len + 3);
        (*algified_name) = kmalloc(algified_name_len, GFP_KERNEL);
-       if (!(algified_name)) {
+       if (!(*algified_name)) {
                rc = -ENOMEM;
                goto out;
        }
@@ -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);