[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <YdS+cgcyKdXUQaU+@debian-BULLSEYE-live-builder-AMD64>
Date: Wed, 5 Jan 2022 02:38:58 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Giovanni Cabiddu <giovanni.cabiddu@...el.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
"open list:QAT DRIVER" <qat-linux@...el.com>,
"open list:CRYPTO API" <linux-crypto@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Cc: usama.anjum@...labora.com
Subject: [PATCH] crypto: use signed variable to store status and error
checking
ret should be signed. adf_cfg_get_param_value and match_string return
signed statuses. The return status may be saved wrongly in unsigned ret
variable. Correct the data type of ret to signed int.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
---
drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c b/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c
index 6d10edc40aca..68d39c833332 100644
--- a/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c
+++ b/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c
@@ -52,7 +52,7 @@ static const char *const dev_cfg_services[] = {
static int get_service_enabled(struct adf_accel_dev *accel_dev)
{
char services[ADF_CFG_MAX_VAL_LEN_IN_BYTES] = {0};
- u32 ret;
+ int ret;
ret = adf_cfg_get_param_value(accel_dev, ADF_GENERAL_SEC,
ADF_SERVICES_ENABLED, services);
--
2.30.2
Powered by blists - more mailing lists