From 4af9f431da537c13ac027835fbd62b837b0e616a Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 14 Mar 2026 06:21:58 +0000 Subject: util/nvmutil: always restore saved errno the last lseek there is only there to reset state, so its errors are irrelevant. Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 493970e1..e9046dc6 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1909,8 +1909,7 @@ try_rw_again: saved_errno = errno; if (lseek_loop(fd, off_orig, SEEK_SET, loop_eagain, loop_eintr) == (off_t)-1) { - if (r < 0) - errno = saved_errno; + errno = saved_errno; return -1; } errno = saved_errno; -- cgit v1.2.1