From: Erwan Velu Date: Wed, 8 Sep 2021 20:18:53 +0000 (+0200) Subject: engines/sg: Return error if generic_close_file fails X-Git-Tag: fio-3.29~104^2~6 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=67486df36b0c4c726c3187f5e74544aa593fbcc5;p=fio.git engines/sg: Return error if generic_close_file fails The current code was returning 1 if generic_close_file() fails. The ret value was prepared with the real error, let's return this one as the per generic_open_file() error handling. Signed-off-by: Erwan Velu --- diff --git a/engines/sg.c b/engines/sg.c index 0c2d2c8b..592c4488 100644 --- a/engines/sg.c +++ b/engines/sg.c @@ -982,7 +982,7 @@ static int fio_sgio_open(struct thread_data *td, struct fio_file *f) if (sd && !sd->type_checked && fio_sgio_type_check(td, f)) { ret = generic_close_file(td, f); - return 1; + return ret; } return 0;