Commit 542b7ffe authored by Tianjia Zhang's avatar Tianjia Zhang Committed by Herbert Xu

crypto: qat - simplify the qat_crypto function

simplify code to remove unnecessary constant string copies.
Signed-off-by: default avatarTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 15f7a4c6
...@@ -250,8 +250,7 @@ static int qat_crypto_create_instances(struct adf_accel_dev *accel_dev) ...@@ -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]; char val[ADF_CFG_MAX_VAL_LEN_IN_BYTES];
INIT_LIST_HEAD(&accel_dev->crypto_list); INIT_LIST_HEAD(&accel_dev->crypto_list);
strlcpy(key, ADF_NUM_CY, sizeof(key)); if (adf_cfg_get_param_value(accel_dev, SEC, ADF_NUM_CY, val))
if (adf_cfg_get_param_value(accel_dev, SEC, key, val))
return -EFAULT; return -EFAULT;
if (kstrtoul(val, 0, &num_inst)) if (kstrtoul(val, 0, &num_inst))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment