crypto: hisilicon/zip - fix the uninitalized 'curr_qm_qp_num'
authorSihang Chen <chensihang1@hisilicon.com>
Fri, 25 Sep 2020 14:06:17 +0000 (22:06 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 2 Oct 2020 08:02:14 +0000 (18:02 +1000)
The 'qm->curr_qm_qp_num' is not initialized, which will result in failure
to write the current_q file.

Signed-off-by: Sihang Chen <chensihang1@hisilicon.com>
Signed-off-by: Yang Shen <shenyang39@huawei.com>
Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/zip/zip_main.c

index f10bf99..4bd2c81 100644 (file)
@@ -760,6 +760,7 @@ static int hisi_zip_qm_init(struct hisi_qm *qm, struct pci_dev *pdev)
        if (qm->fun_type == QM_HW_PF) {
                qm->qp_base = HZIP_PF_DEF_Q_BASE;
                qm->qp_num = pf_q_num;
+               qm->debug.curr_qm_qp_num = pf_q_num;
                qm->qm_list = &zip_devices;
        } else if (qm->fun_type == QM_HW_VF && qm->ver == QM_HW_V1) {
                /*