Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu: - Added aesni/avx/x86_64 implementations for camellia. - Optimised AVX code for cast5/serpent/twofish/cast6. - Fixed vmac bug with unaligned input. - Allow compression algorithms in FIPS mode. - Optimised crc32c implementation for Intel. - Misc fixes. * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (32 commits) crypto: caam - Updated SEC-4.0 device tree binding for ERA information. crypto: testmgr - remove superfluous initializers for xts(aes) crypto: testmgr - allow compression algs in fips mode crypto: testmgr - add larger crc32c test vector to test FPU path in crc32c_intel crypto: testmgr - clean alg_test_null entries in alg_test_descs[] crypto: testmgr - remove fips_allowed flag from camellia-aesni null-tests crypto: cast5/cast6 - move lookup tables to shared module padata: use __this_cpu_read per-cpu helper crypto: s5p-sss - Fix compilation error crypto: picoxcell - Add terminating entry for platform_device_id table crypto: omap-aes - select BLKCIPHER2 crypto: camellia - add AES-NI/AVX/x86_64 assembler implementation of camellia cipher crypto: camellia-x86_64 - share common functions and move structures and function definitions to header file crypto: tcrypt - add async speed test for camellia cipher crypto: tegra-aes - fix error-valued pointer dereference crypto: tegra - fix missing unlock on error case crypto: cast5/avx - avoid using temporary stack buffers crypto: serpent/avx - avoid using temporary stack buffers crypto: twofish/avx - avoid using temporary stack buffers crypto: cast6/avx - avoid using temporary stack buffers ...
This commit is contained in:
@@ -672,8 +672,10 @@ static int tegra_aes_get_random(struct crypto_rng *tfm, u8 *rdata,
|
||||
mutex_lock(&aes_lock);
|
||||
|
||||
ret = clk_prepare_enable(dd->aes_clk);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
mutex_unlock(&aes_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ctx->dd = dd;
|
||||
dd->ctx = ctx;
|
||||
@@ -757,8 +759,10 @@ static int tegra_aes_rng_reset(struct crypto_rng *tfm, u8 *seed,
|
||||
dd->flags = FLAGS_ENCRYPT | FLAGS_RNG;
|
||||
|
||||
ret = clk_prepare_enable(dd->aes_clk);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
mutex_unlock(&aes_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
aes_set_key(dd);
|
||||
|
||||
@@ -1029,7 +1033,7 @@ out:
|
||||
if (dd->buf_out)
|
||||
dma_free_coherent(dev, AES_HW_DMA_BUFFER_SIZE_BYTES,
|
||||
dd->buf_out, dd->dma_buf_out);
|
||||
if (IS_ERR(dd->aes_clk))
|
||||
if (!IS_ERR(dd->aes_clk))
|
||||
clk_put(dd->aes_clk);
|
||||
if (aes_wq)
|
||||
destroy_workqueue(aes_wq);
|
||||
|
Reference in New Issue
Block a user