driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7C6LD CVE: NA
----------------------------------------------------------------------
1. Remove duplicate assignment for 'qm->uacce'; 2. Remove duplicate release for 'uacce' in hisi_qm_uninit(); 3. Fix check condition from 'use_sva' to 'use_uacce' to prevent nosva mode error.
Fixes: a1666f44c225 ("crypto: hisilicon/qm - support no-sva feature") Signed-off-by: Weili Qian qianweili@huawei.com Signed-off-by: JiangShui Yang yangjiangshui@h-partners.com --- drivers/crypto/hisilicon/qm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 3cc9ccedb386..a1e30adbe009 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -2804,7 +2804,6 @@ static int qm_alloc_uacce(struct hisi_qm *qm) qm->uacce = uacce;
qm_uacce_base_init(qm); - qm->uacce = uacce; INIT_LIST_HEAD(&qm->isolate_data.qm_hw_errs); mutex_init(&qm->isolate_data.isolate_lock);
@@ -3113,10 +3112,6 @@ void hisi_qm_uninit(struct hisi_qm *qm) 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);
@@ -4638,7 +4633,7 @@ static int qm_controller_reset(struct hisi_qm *qm) qm_reset_bit_clear(qm);
/* if resetting fails, isolate the device */ - if (qm->use_sva) + if (qm->use_uacce) qm->isolate_data.is_isolate = true; return ret; }