diff --git a/src/mngt/ocf_mngt_common.c b/src/mngt/ocf_mngt_common.c index 5305521..85dc199 100644 --- a/src/mngt/ocf_mngt_common.c +++ b/src/mngt/ocf_mngt_common.c @@ -1,5 +1,6 @@ /* * Copyright(c) 2012-2021 Intel Corporation + * Copyright(c) 2024 Huawei Technologies * SPDX-License-Identifier: BSD-3-Clause */ @@ -275,10 +276,10 @@ static int _ocf_mngt_cache_trylock(ocf_cache_t cache, if (env_bit_test(ocf_cache_state_stopping, &cache->cache_state)) { /* Cache already stopping, do not allow any operation */ unlock_fn(&cache->lock); - return -OCF_ERR_CACHE_NOT_EXIST; + result = -OCF_ERR_CACHE_NOT_EXIST; } - return 0; + return result; } static void _ocf_mngt_cache_unlock(ocf_cache_t cache,