diff options
author | Chenghai Huang <huangchenghai2@huawei.com> | 2024-04-07 11:00:00 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-04-12 10:07:53 +0300 |
commit | c9ccfd5e0ff0dd929ce86d1b5f3c6a414110947a (patch) | |
tree | 66698b50b31765ff31e04dfbc828fc21786748ab /drivers/crypto/hisilicon | |
parent | 745a11899a8c1e8c6213ec054585a556ad11fdb6 (diff) | |
download | linux-c9ccfd5e0ff0dd929ce86d1b5f3c6a414110947a.tar.xz |
crypto: hisilicon/qm - Add the err memory release process to qm uninit
When the qm uninit command is executed, the err data needs to
be released to prevent memory leakage. The error information
release operation and uacce_remove are integrated in
qm_remove_uacce.
So add the qm_remove_uacce to qm uninit to avoid err memory
leakage.
Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/hisilicon')
-rw-r--r-- | drivers/crypto/hisilicon/qm.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index cedb3af1fc1a..3dac8d8e8568 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -2896,12 +2896,9 @@ void hisi_qm_uninit(struct hisi_qm *qm) hisi_qm_set_state(qm, QM_NOT_READY); up_write(&qm->qps_lock); + qm_remove_uacce(qm); qm_irqs_unregister(qm); hisi_qm_pci_uninit(qm); - if (qm->use_sva) { - uacce_remove(qm->uacce); - qm->uacce = NULL; - } } EXPORT_SYMBOL_GPL(hisi_qm_uninit); |