USB: serial: mos7720: fix use-after-free on probe errors
[pandora-kernel.git] / crypto / ecb.c
index 6310387..12011af 100644 (file)
@@ -55,7 +55,7 @@ static int crypto_ecb_crypt(struct blkcipher_desc *desc,
 
                do {
                        fn(crypto_cipher_tfm(tfm), wdst, wsrc);
-       
+
                        wsrc += bsize;
                        wdst += bsize;
                } while ((nbytes -= bsize) >= bsize);
@@ -128,7 +128,7 @@ static struct crypto_instance *crypto_ecb_alloc(struct rtattr **tb)
        alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER,
                                  CRYPTO_ALG_TYPE_MASK);
        if (IS_ERR(alg))
-               return ERR_PTR(PTR_ERR(alg));
+               return ERR_CAST(alg);
 
        inst = crypto_alloc_instance("ecb", alg);
        if (IS_ERR(inst))
@@ -185,3 +185,4 @@ module_exit(crypto_ecb_module_exit);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("ECB block cipher algorithm");
+MODULE_ALIAS_CRYPTO("ecb");