aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto/qat
diff options
context:
space:
mode:
authorGiovanni Cabiddu2020-10-12 21:38:42 +0100
committerHerbert Xu2020-10-30 17:34:58 +1100
commit69d0fc22cf91c9488fcc6e6095b70e3f228ad580 (patch)
tree2204f328a55801ef8fded7e28b3bdb4d17bc5d59 /drivers/crypto/qat
parent83ab8c4b2d893cf8718236e539287661c34df9ff (diff)
crypto: qat - change return value in adf_cfg_add_key_value_param()
If the parameter type provided to adf_cfg_add_key_value_param() is invalid, return -EINVAL instead of -1 that is treated as -EPERM and may confuse. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/qat')
-rw-r--r--drivers/crypto/qat/qat_common/adf_cfg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/qat/qat_common/adf_cfg.c b/drivers/crypto/qat/qat_common/adf_cfg.c
index 22ae32838113..f2a29c70d61a 100644
--- a/drivers/crypto/qat/qat_common/adf_cfg.c
+++ b/drivers/crypto/qat/qat_common/adf_cfg.c
@@ -243,7 +243,7 @@ int adf_cfg_add_key_value_param(struct adf_accel_dev *accel_dev,
} else {
dev_err(&GET_DEV(accel_dev), "Unknown type given.\n");
kfree(key_val);
- return -1;
+ return -EINVAL;
}
key_val->type = type;
down_write(&cfg->lock);