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 <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-13 23:02:26 +00:00
parent 0450c2bef1
commit 692632275c

View File

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