diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-19 12:00:53 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-19 12:00:53 +0200 |
commit | 035b7bf3544ab9927dc2d64cf1e3214237ff0f71 (patch) | |
tree | 64963c5c050dc741b5091478bafeef9f9691fe6d /cryptodev_cipher.c | |
parent | e2ff6f32b197ff5d171676aca318a73aeb3fcbe3 (diff) | |
download | cryptodev-linux-035b7bf3544ab9927dc2d64cf1e3214237ff0f71.tar.gz cryptodev-linux-035b7bf3544ab9927dc2d64cf1e3214237ff0f71.tar.xz cryptodev-linux-035b7bf3544ab9927dc2d64cf1e3214237ff0f71.zip |
hash_reset() was combined with hash_init() to avoid requiring two calls for hash initialization.
Diffstat (limited to 'cryptodev_cipher.c')
-rw-r--r-- | cryptodev_cipher.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cryptodev_cipher.c b/cryptodev_cipher.c index 0446a5d..05e6db3 100644 --- a/cryptodev_cipher.c +++ b/cryptodev_cipher.c @@ -258,6 +258,13 @@ int ret; ahash_request_set_callback(hdata->async.request, CRYPTO_TFM_REQ_MAY_BACKLOG, cryptodev_complete, hdata->async.result); + ret = crypto_ahash_init(hdata->async.request); + if (unlikely(ret)) { + dprintk(0,KERN_ERR, + "error in crypto_hash_init()\n"); + goto error; + } + hdata->init = 1; return 0; |