diff options
author | Tianjia Zhang <tianjia.zhang@linux.alibaba.com> | 2020-03-03 23:48:09 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-03-12 23:00:13 +1100 |
commit | 542b7ffee3e26ffef5d63e7b5ab7602129daeaad (patch) | |
tree | 3e28dbf3272c9eaabee18fd2def2e31ce3dde9bb /drivers/crypto | |
parent | 15f7a4c65293d188651e21a9c5ab6bd8f99a1459 (diff) | |
download | linux-542b7ffee3e26ffef5d63e7b5ab7602129daeaad.tar.bz2 |
crypto: qat - simplify the qat_crypto function
simplify code to remove unnecessary constant string copies.
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/qat/qat_common/qat_crypto.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/qat/qat_common/qat_crypto.c b/drivers/crypto/qat/qat_common/qat_crypto.c index 3852d31ce0a4..fb504cee0305 100644 --- a/drivers/crypto/qat/qat_common/qat_crypto.c +++ b/drivers/crypto/qat/qat_common/qat_crypto.c @@ -250,8 +250,7 @@ static int qat_crypto_create_instances(struct adf_accel_dev *accel_dev) char val[ADF_CFG_MAX_VAL_LEN_IN_BYTES]; INIT_LIST_HEAD(&accel_dev->crypto_list); - strlcpy(key, ADF_NUM_CY, sizeof(key)); - if (adf_cfg_get_param_value(accel_dev, SEC, key, val)) + if (adf_cfg_get_param_value(accel_dev, SEC, ADF_NUM_CY, val)) return -EFAULT; if (kstrtoul(val, 0, &num_inst)) |