Fix setting core params.

If core id wasn't specified, function was returning error insted of setting
given param for all cores.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk 2019-09-04 07:48:04 -04:00
parent 13c5462c7d
commit 7ecd537170

View File

@ -1900,7 +1900,7 @@ void cache_mngt_wait_for_rq_finish(ocf_cache_t cache)
int cache_mngt_set_core_params(struct kcas_set_core_param *info) int cache_mngt_set_core_params(struct kcas_set_core_param *info)
{ {
ocf_cache_t cache; ocf_cache_t cache;
ocf_core_t core; ocf_core_t core = NULL;
int result; int result;
result = mngt_get_cache_by_id(cas_ctx, info->cache_id, &cache); result = mngt_get_cache_by_id(cas_ctx, info->cache_id, &cache);
@ -1908,7 +1908,7 @@ int cache_mngt_set_core_params(struct kcas_set_core_param *info)
return result; return result;
result = get_core_by_id(cache, info->core_id, &core); result = get_core_by_id(cache, info->core_id, &core);
if (result) if (result && result != -OCF_ERR_CORE_NOT_EXIST)
goto out; goto out;
switch (info->param_id) { switch (info->param_id) {