diff --git a/dataplacement.c b/dataplacement.c index 8a4c8e6441..6006a9548e 100644 --- a/dataplacement.c +++ b/dataplacement.c @@ -18,7 +18,7 @@ static int fdp_ruh_info(struct thread_data *td, struct fio_file *f, struct fio_ruhs_info *ruhs) { - int ret = -EINVAL; + int ret = EINVAL; if (!td->io_ops) { log_err("fio: no ops set in fdp init?!\n"); @@ -47,13 +47,13 @@ static int init_ruh_info(struct thread_data *td, struct fio_file *f) ruhs = scalloc(1, sizeof(*ruhs) + FDP_MAX_RUHS * sizeof(*ruhs->plis)); if (!ruhs) - return -ENOMEM; + return ENOMEM; /* set up the data structure used for FDP to work with the supplied stream IDs */ if (td->o.dp_type == FIO_DP_STREAMS) { if (!td->o.dp_nr_ids) { log_err("fio: stream IDs must be provided for dataplacement=streams\n"); - return -EINVAL; + return EINVAL; } ruhs->nr_ruhs = td->o.dp_nr_ids; for (int i = 0; i < ruhs->nr_ruhs; i++) @@ -80,14 +80,14 @@ static int init_ruh_info(struct thread_data *td, struct fio_file *f) for (i = 0; i < td->o.dp_nr_ids; i++) { if (td->o.dp_ids[i] >= ruhs->nr_ruhs) { - ret = -EINVAL; + ret = EINVAL; goto out; } } tmp = scalloc(1, sizeof(*tmp) + ruhs->nr_ruhs * sizeof(*tmp->plis)); if (!tmp) { - ret = -ENOMEM; + ret = ENOMEM; goto out; } @@ -117,13 +117,13 @@ static int init_ruh_scheme(struct thread_data *td, struct fio_file *f) if (!scheme_fp) { log_err("fio: ruh scheme failed to open scheme file %s\n", td->o.dp_scheme_file); - ret = -errno; + ret = errno; goto out; } ruh_scheme = scalloc(1, sizeof(*ruh_scheme)); if (!ruh_scheme) { - ret = -ENOMEM; + ret = ENOMEM; goto out_with_close_fp; }