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>
This commit is contained in:
Родитель
83ab8c4b2d
Коммит
69d0fc22cf
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче