]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ext4 crypto: fix ext4_get_crypto_ctx()'s calling convention in ext4_decrypt_one
authorTheodore Ts'o <tytso@mit.edu>
Mon, 8 Jun 2015 15:54:56 +0000 (11:54 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 8 Jun 2015 15:54:56 +0000 (11:54 -0400)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/crypto.c

index f5c82e8b7b5ce205b5daabe6bfc6801a2d805848..45731558138c8e00cb3126f077bb0e9be7714d6f 100644 (file)
@@ -396,8 +396,8 @@ int ext4_decrypt_one(struct inode *inode, struct page *page)
 
        struct ext4_crypto_ctx *ctx = ext4_get_crypto_ctx(inode);
 
-       if (!ctx)
-               return -ENOMEM;
+       if (IS_ERR(ctx))
+               return PTR_ERR(ctx);
        ret = ext4_decrypt(ctx, page);
        ext4_release_crypto_ctx(ctx);
        return ret;