aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/qat/qat_api/common/ctrl/sal_compression.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/qat/qat_api/common/ctrl/sal_compression.c')
-rw-r--r--sys/dev/qat/qat_api/common/ctrl/sal_compression.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/qat/qat_api/common/ctrl/sal_compression.c b/sys/dev/qat/qat_api/common/ctrl/sal_compression.c
index c0f5a411d87e..e8ae47f0f0d3 100644
--- a/sys/dev/qat/qat_api/common/ctrl/sal_compression.c
+++ b/sys/dev/qat/qat_api/common/ctrl/sal_compression.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause */
-/* Copyright(c) 2007-2022 Intel Corporation */
+/* Copyright(c) 2007-2025 Intel Corporation */
/**
*****************************************************************************
* @file sal_compression.c
@@ -371,9 +371,6 @@ SalCtrl_CompressionInit(icp_accel_dev_t *device, sal_service_t *service)
SAL_SERVICE_GOOD_FOR_INIT(pCompressionService);
- pCompressionService->generic_service_info.state =
- SAL_SERVICE_STATE_INITIALIZING;
-
if (CPA_FALSE == pCompressionService->generic_service_info.is_dyn) {
section = icpGetProcessName();
}
@@ -1438,7 +1435,8 @@ cpaDcInstanceGetInfo2(const CpaInstanceHandle instanceHandle,
pInstanceInfo2->isOffloaded = CPA_TRUE;
/* Get the instance name and part name from the config file */
dev = icp_adf_getAccelDevByAccelId(pCompressionService->pkgID);
- if (NULL == dev) {
+ if (NULL == dev ||
+ 0 == strnlen(dev->deviceName, ADF_DEVICE_TYPE_LENGTH + 1)) {
QAT_UTILS_LOG("Can not find device for the instance.\n");
LAC_OS_BZERO(pInstanceInfo2, sizeof(CpaInstanceInfo2));
return CPA_STATUS_FAIL;