From: Chen Ni <nichen@iscas.ac.cn>
To: giovanni.cabiddu@intel.com, herbert@gondor.apana.org.au,
davem@davemloft.net, markas.rapoportas@intel.com,
ahsan.atta@intel.com, mun.chun.yep@intel.com, xin.zeng@intel.com
Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org, Chen Ni <nichen@iscas.ac.cn>
Subject: [PATCH] crypto: qat - add check for adf_cfg_add_key_value_param
Date: Wed, 5 Jun 2024 11:18:35 +0800 [thread overview]
Message-ID: <20240605031835.2916052-1-nichen@iscas.ac.cn> (raw)
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@iscas.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
next reply other threads:[~2024-06-05 3:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 3:18 Chen Ni [this message]
2024-06-11 11:23 ` Cabiddu, Giovanni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240605031835.2916052-1-nichen@iscas.ac.cn \
--to=nichen@iscas.ac.cn \
--cc=ahsan.atta@intel.com \
--cc=davem@davemloft.net \
--cc=giovanni.cabiddu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markas.rapoportas@intel.com \
--cc=mun.chun.yep@intel.com \
--cc=qat-linux@intel.com \
--cc=xin.zeng@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®