Fixed some bugs found by the coverity tool
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
This commit is contained in:
@@ -774,9 +774,16 @@ int ocf_metadata_query_cores_segment_io(
|
||||
uint32_t offset;
|
||||
uint32_t io_count;
|
||||
uint32_t i;
|
||||
uint32_t max_pages_per_io = ocf_volume_get_max_io_size(volume) /
|
||||
PAGE_SIZE;
|
||||
uint32_t max_pages_per_io;
|
||||
int err = 0;
|
||||
unsigned int max_io_size = ocf_volume_get_max_io_size(volume);
|
||||
|
||||
if (!max_io_size) {
|
||||
err = -OCF_ERR_INVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
max_pages_per_io = max_io_size / PAGE_SIZE;
|
||||
|
||||
/* Allocate data */
|
||||
segment_data->data = ctx_data_alloc(owner,
|
||||
|
@@ -373,7 +373,7 @@ static int _raw_ram_flush_do_asynch_fill(ocf_cache_t cache,
|
||||
uint32_t raw_page;
|
||||
struct _raw_ram_flush_ctx *ctx = context;
|
||||
struct ocf_metadata_raw *raw = NULL;
|
||||
uint64_t size;
|
||||
uint32_t size;
|
||||
|
||||
ENV_BUG_ON(!ctx);
|
||||
|
||||
|
Reference in New Issue
Block a user