summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Hai <wanghai38@huawei.com>2024-10-29 16:05:23 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2024-11-10 04:50:54 +0100
commitd8920a722a8cec625267c09ed40af8fd433d7f9a (patch)
tree06996dffd2ea7f9ad113cce6bc723c19ec391856
parentcrypto: rsassa-pkcs1 - Reinstate support for legacy protocols (diff)
downloadlinux-d8920a722a8cec625267c09ed40af8fd433d7f9a.tar.xz
linux-d8920a722a8cec625267c09ed40af8fd433d7f9a.zip
crypto: qat - Fix missing destroy_workqueue in adf_init_aer()
The adf_init_aer() won't destroy device_reset_wq when alloc_workqueue() for device_sriov_wq failed. Add destroy_workqueue for device_reset_wq to fix this issue. Fixes: 4469f9b23468 ("crypto: qat - re-enable sriov after pf reset") Signed-off-by: Wang Hai <wanghai38@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/crypto/intel/qat/qat_common/adf_aer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/crypto/intel/qat/qat_common/adf_aer.c b/drivers/crypto/intel/qat/qat_common/adf_aer.c
index ec7913ab00a2..4cb8bd83f570 100644
--- a/drivers/crypto/intel/qat/qat_common/adf_aer.c
+++ b/drivers/crypto/intel/qat/qat_common/adf_aer.c
@@ -281,8 +281,11 @@ int adf_init_aer(void)
return -EFAULT;
device_sriov_wq = alloc_workqueue("qat_device_sriov_wq", 0, 0);
- if (!device_sriov_wq)
+ if (!device_sriov_wq) {
+ destroy_workqueue(device_reset_wq);
+ device_reset_wq = NULL;
return -EFAULT;
+ }
return 0;
}