staging: sep: add missing destroy_workqueue() in sep_crypto.c

Add the missing destroy_workqueue() before return from
sep_crypto_setup() and sep_crypto_takedown().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Wei Yongjun 2013-12-20 11:05:16 +08:00 committed by Greg Kroah-Hartman
parent b751bc77be
commit a7c7eb03fd
1 changed files with 2 additions and 0 deletions

View File

@ -3926,6 +3926,7 @@ int sep_crypto_setup(void)
err_algs:
for (k = 0; k < i; k++)
crypto_unregister_ahash(&hash_algs[k]);
destroy_workqueue(sep_dev->workqueue);
return err;
err_crypto_algs:
@ -3944,6 +3945,7 @@ void sep_crypto_takedown(void)
for (i = 0; i < ARRAY_SIZE(crypto_algs); i++)
crypto_unregister_alg(&crypto_algs[i]);
destroy_workqueue(sep_dev->workqueue);
tasklet_kill(&sep_dev->finish_tasklet);
}