From 692632275cce14b648f638aa4b01de69bf75d308 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 13 Mar 2026 23:02:26 +0000 Subject: util/nvmutil: properly reset lseek on error don't return. set r instead. this will fall through and return the same way, but with proper reset. Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'util') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 68627d3a..901ba9a4 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1719,10 +1719,9 @@ try_rw_again: goto err_prw; if ((off_orig = lseek_eintr(fd, (off_t)0, SEEK_CUR)) == (off_t)-1) - return -1; - - if (lseek_eintr(fd, off, SEEK_SET) == (off_t)-1) - return -1; + r = -1; + else if (lseek_eintr(fd, off, SEEK_SET) == (off_t)-1) + r = -1; do { if (rw_type == IO_PREAD) -- cgit v1.2.1