staging: sep: add missing destroy_workqueue() in sep_crypto.c
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 20 Dec 2013 03:05:16 +0000 (11:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Dec 2013 19:45:09 +0000 (11:45 -0800)
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>
drivers/staging/sep/sep_crypto.c

index cb3e63b7c319a75f89c49b57250faec64a73a595..7fc267550c653bc080101d8c4a863ae9611f2b81 100644 (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);
 }