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 <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-14 06:21:58 +00:00
parent b1725b6a84
commit 4af9f431da

View File

@@ -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;