diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto.c b/drivers/crypto/hisilicon/hpre/hpre_crypto.c index 1fb6b07bd466d17cabfd84401325893519328717..ff72ee9049826bb72aa2ac7f1684d1c90f7ec58d 100644 --- a/drivers/crypto/hisilicon/hpre/hpre_crypto.c +++ b/drivers/crypto/hisilicon/hpre/hpre_crypto.c @@ -234,8 +234,7 @@ static int _cp_data_to_dma_buf(struct hpre_asym_request *hpre_req, } if (is_src) { scatterwalk_map_and_copy(ptr + shift, data, 0, len, 0); - if (is_dh) - (void)hpre_bn_format(ptr, ctx->key_sz); + (void)hpre_bn_format(ptr, ctx->key_sz); hpre_req->src_align = ptr; } else { hpre_req->dst_align = ptr; diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c index 95ab6ae62b531a1c2530627eb91f4c99db65f189..9232f661dce6a697431b3ef62868f99d1d1bea40 100644 --- a/drivers/crypto/hisilicon/hpre/hpre_main.c +++ b/drivers/crypto/hisilicon/hpre/hpre_main.c @@ -1246,6 +1246,7 @@ static void hpre_remove(struct pci_dev *pdev) int ret; hpre_remove_from_list(hpre); +#ifdef CONFIG_PCI_IOV if (qm->fun_type == QM_HW_PF && hpre->ctrl->num_vfs != 0) { ret = hpre_sriov_disable(pdev); if (ret) { @@ -1253,6 +1254,7 @@ static void hpre_remove(struct pci_dev *pdev) return; } } +#endif hpre_debugfs_exit(hpre); hisi_qm_stop(qm); if (qm->fun_type == QM_HW_PF)