common/qat: fix undefined initial slice

This commit fixes undefined initial value of slice capability.
When unset it could lead to undefined read of capability due to
stack frame picked values, is should therefore be set to 0.

Fixes: b3cbbcdffa ("common/qat: read HW slice configuration")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
This commit is contained in:
Arek Kusztal 2022-11-07 09:23:36 +00:00 committed by Akhil Goyal
parent e0e095d314
commit 29d5bf63ed

View File

@ -361,7 +361,7 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
{ {
int sym_ret = 0, asym_ret = 0, comp_ret = 0; int sym_ret = 0, asym_ret = 0, comp_ret = 0;
int num_pmds_created = 0; int num_pmds_created = 0;
uint16_t capa; uint16_t capa = 0;
struct qat_pci_device *qat_pci_dev; struct qat_pci_device *qat_pci_dev;
struct qat_dev_hw_spec_funcs *ops_hw; struct qat_dev_hw_spec_funcs *ops_hw;
struct qat_dev_cmd_param qat_dev_cmd_param[] = { struct qat_dev_cmd_param qat_dev_cmd_param[] = {