crypto: user - fix info leaks in report API
[firefly-linux-kernel-4.4.55.git] / crypto / ctr.c
index 4ca7222cfeb6ac4bfcf32e4a97a072e1535577a7..095dcb66d72ddb8f5d2be2d61710e1c5fbdf544c 100644 (file)
@@ -334,9 +334,8 @@ static struct crypto_instance *crypto_rfc3686_alloc(struct rtattr **tb)
 
        alg = crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_BLKCIPHER,
                                  CRYPTO_ALG_TYPE_MASK);
-       err = PTR_ERR(alg);
        if (IS_ERR(alg))
-               return ERR_PTR(err);
+               return ERR_CAST(alg);
 
        /* We only support 16-byte blocks. */
        err = -EINVAL;