Skip to content

Commit d8920a7

Browse files
Wang Haiherbertx
authored andcommitted
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: 4469f9b ("crypto: qat - re-enable sriov after pf reset") Signed-off-by: Wang Hai <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent a03a728 commit d8920a7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/crypto/intel/qat/qat_common/adf_aer.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,11 @@ int adf_init_aer(void)
281281
return -EFAULT;
282282

283283
device_sriov_wq = alloc_workqueue("qat_device_sriov_wq", 0, 0);
284-
if (!device_sriov_wq)
284+
if (!device_sriov_wq) {
285+
destroy_workqueue(device_reset_wq);
286+
device_reset_wq = NULL;
285287
return -EFAULT;
288+
}
286289

287290
return 0;
288291
}

0 commit comments

Comments
 (0)