[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240605031835.2916052-1-nichen@iscas.ac.cn>
Date: Wed, 5 Jun 2024 11:18:35 +0800
From: Chen Ni <nichen@...as.ac.cn>
To: giovanni.cabiddu@...el.com,
herbert@...dor.apana.org.au,
davem@...emloft.net,
markas.rapoportas@...el.com,
ahsan.atta@...el.com,
mun.chun.yep@...el.com,
xin.zeng@...el.com
Cc: qat-linux@...el.com,
linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org,
Chen Ni <nichen@...as.ac.cn>
Subject: [PATCH] crypto: qat - add check for adf_cfg_add_key_value_param
Add check for the return value of adf_cfg_add_key_value_param() and
return the error if it fails in order to catch the error.
Fixes: 4469f9b23468 ("crypto: qat - re-enable sriov after pf reset")
Signed-off-by: Chen Ni <nichen@...as.ac.cn>
---
drivers/crypto/intel/qat/qat_common/adf_sriov.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/intel/qat/qat_common/adf_sriov.c b/drivers/crypto/intel/qat/qat_common/adf_sriov.c
index 8d645e7e04aa..30ff9097f527 100644
--- a/drivers/crypto/intel/qat/qat_common/adf_sriov.c
+++ b/drivers/crypto/intel/qat/qat_common/adf_sriov.c
@@ -228,8 +228,10 @@ int adf_sriov_configure(struct pci_dev *pdev, int numvfs)
return ret;
val = 1;
- adf_cfg_add_key_value_param(accel_dev, ADF_GENERAL_SEC, ADF_SRIOV_ENABLED,
+ ret = adf_cfg_add_key_value_param(accel_dev, ADF_GENERAL_SEC, ADF_SRIOV_ENABLED,
&val, ADF_DEC);
+ if (ret)
+ return ret;
return numvfs;
}
--
2.25.1
Powered by blists - more mailing lists